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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 5
Registered: ‎01-17-2013
My Device: bold
My Carrier: etisalat
Accepted Solution

Can't get the notification if the client was offline then become online

Hello,

 

I'm using BB Pap service notification and I send a notification to BB client and it got the notification correctly while it's online,

But if I send a notification while the mobile was offline then back online again, no notification received.

 

 

Please advise

 

Highlighted
Retired
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: Can't get the notification if the client was offline then become online

Hi,

 

You should be able to get pushes when your device is out of coverage, powered off, etc. and then is available again.

 

What BlackBerry OS are you using?  What language is your device-side application (push-enabled application) written using?

What language is your server-side application (Push Initiator) written using?

 

Thanks,

 

Matt

New Contributor
Posts: 5
Registered: ‎01-17-2013
My Device: bold
My Carrier: etisalat

Re: Can't get the notification if the client was offline then become online

[ Edited ]

Thanks Matt,

 

Blackberry OS is: 6.0.0.285

 

device-side application language: J2ME

 

server-side application language: J2SE

 

and here after the server side code:

	IdGenerator idGenerator = new IdGeneratorImpl();
	Content content = new TextContent("psuh message");
	
	     List<String> addresses = new ArrayList<String>();
             addresses.add("some_pin");
	 
	 String systemIdentifier = "some_appid";
	PushMessageControl pushMessageControl = new PushMessageControl(true, idGenerator,systemIdentifier , addresses);
	
	
		PapService papService = new PapServiceImpl();
			PushSDKProperties pushSDKProperties = new PushSDKPropertiesImpl();
	
	pushSDKProperties.setPublicPpgAddress("https://cpxxxx.pushapi.eval.blackberry.com/mss/PD_pushRequest");
	
	pushSDKProperties.setHttpIsPersistent(true);
	
	pushSDKProperties.setHttpConnectionTimeout(60000);
	
	pushSDKProperties.setHttpReadTimeout(120000);
	
		HttpClientImpl httpClient = new HttpClientImpl();
	
	httpClient.setPushSDKProperties(pushSDKProperties);
	
	papService.setHttpClient(httpClient);
	
	papService.setPushSDKProperties(pushSDKProperties);
	
	pushResponse = papService.push(systemIdentifier, "some_password", systemIdentifier, pushMessageControl, content);

 

 

 

Retired
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: Can't get the notification if the client was offline then become online

Hi,

 

Just for future reference, try to avoid putting your device PIN, appid, password, and full PPG URL in your forum post.

 

From your sample code, it looks like you were missing the initial "cp" right after https:// and before your content provider ID.  

 

The publicPPGAddress needs to be of the following form:

https://cp{cpid}.pushapi.eval.blackberry.com/mss/PD_pushRequest  where {cpid} is replaced with your content provider ID

 

Let me know if that helps.

 

Thanks,

 

Matt