Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

Reply
Contributor
akshan
Posts: 19
Registered: ‎02-19-2014
My Device: Blackberry Q10
My Carrier: Airtel
Accepted Solution

Unable to Receive Push Notification

HI i am new to Blackberry Development.

When i tried with sample Push Initiator which comes with Push SDK and Sample Push-enabled application[Push Capture] from github i can Receive Pushes in that sample application.But when i try the same logic in My own client application i am not receiving Pushes..

Steps I followed:

 

  • Registered with Push service and got Confirmation mail with AppID,Password and PPG url.
  • With those details i set to receive Pushes like:Called the create function and createChannel,success callback was called and it returned device token also. But still i am not receiving Pushes in my application.Plz help where i am lagging.

Doubt:

 

How Pushes differentiate the client app and devices while sending Pushes.Can we use same AppID for different Applications.

 

 

NOTE:

 

i used the same AppID which i used for sample app.

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Unable to Receive Push Notification

Hi there,

 

You cannot use the same app ID across multiple applications. Please delete all applications you have created from the device, then reset the device. After this is done push may begin working.

 

If you continue to experience difficulties please post:

the result of your createChannel call

whether your application is running when the push is sent

the target invoke ID used in the app and in the bar-descriptor.xml file

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
akshan
Posts: 19
Registered: ‎02-19-2014
My Device: Blackberry Q10
My Carrier: Airtel

Re: Unable to Receive Push Notification

Thanks Garett now i can receive Pushes..
Also i have one more doubt.. Once we receive Pushes Badge icon automatically added to my APP icon in home screen..Can we make that Badge not to display?? plz suggest
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Unable to Receive Push Notification


akshan wrote:
Thanks Garett now i can receive Pushes..
Also i have one more doubt.. Once we receive Pushes Badge icon automatically added to my APP icon in home screen..Can we make that Badge not to display?? plz suggest

The spark icon is not added by Push, your app would need to add this using separate code. Remove that code and no more spark :smileyhappy:

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
akshan
Posts: 19
Registered: ‎02-19-2014
My Device: Blackberry Q10
My Carrier: Airtel

Re: Unable to Receive Push Notification

When I use
new Notification(title,options);
splat icon gets added on Blackberry Hub,Notifications and App icon..if I remove that line of code I am not getting splat on 3 places.. My requirement is splat should display on Hub and Notifications screen, Only place I don't want to display is above App' s icon in Home screen..
Any particular line of code to remove?? Plz suggest
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Unable to Receive Push Notification

The spark on the icon happens automatically. Out of curiosity, why don't you want it to appear on the icon?

 

You could try manually removing the spark using:

https://developer.blackberry.com/native/reference/cascades/bb__application.html#function-seticonbadg...

 

But that would be about the only option.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
akshan
Posts: 19
Registered: ‎02-19-2014
My Device: Blackberry Q10
My Carrier: Airtel

Re: Unable to Receive Push Notification

Hi Garett, the link which you provided is for Cascades ..i need to hide splat on App's icon in Blackberry Webworks application.i searched and didnot get appropriate solution ..Plz suggest the required code. Thankyou
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Unable to Receive Push Notification

It may be best to start a new thread in the WebWorks forum as this thread is already solved and the question has veered from being push related.

 

I'm also less familiar with WebWorks, someone over there may be able to help. I would still suggest adding a use case to your question so folks understand the reason for not wanting the spark.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
akshan
Posts: 19
Registered: ‎02-19-2014
My Device: Blackberry Q10
My Carrier: Airtel

Unable to Receive Push Notification When app is closed

[ Edited ]



HI i have one doubt regarding PushService object once we call the blackberry.push.PushService.create() ..
Steps:
1) Launch App
2) Call blackberry.push.PushService.create()
3) PushService object is created as a result of create()

4) when i close the app and launch again, i need to again call create() ..Stuck in this point,Plz suggest.

Note:

In sample PushCapture app only once they configured and registered.So when app is closed or relaunched also they are not calling create() again and they are Receiving Pushes even when the app is closed. BUT i am not receiving Pushes when app is closed.

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Unable to Receive Push Notification When app is closed

Yes, you want to call create() every time the app launches. The PushService object, created by the create() call, is used to extract the push payload, so it's good to always have this object ready.

 

The createChannel() call only needs to be called the first time the app runs though.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.