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
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