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: 8
Registered: ‎03-30-2010
My Device: BlackBerry Stor 9530
My Carrier: developer

Push Messages Are Not Delivered

Hi all!

 

I'm using low level API to generate push messages. After I call PapService.push() I print PushResponse.getDescription() and it says:

"The request has been accepted for processing."

 

But there are no messages received on device.

 

Here is my code:

        public static final String APP_ID = <app-id emailed by RIM>;
	public static final String PASSWORD = <password provided by rim>;
	
	
	public static void main(String[] args) throws PushSDKException,
			BadMessageException, UnauthorizedException {

		IdGenerator idGenerator = new IdGeneratorImpl();
		List<String> addresses = new ArrayList<String>();
		addresses.add(<8-symbol hex PIN>);
		PushMessageControl pushMessageControl = new PushMessageControl(true,
				idGenerator, APP_ID);
		pushMessageControl.setAddressList(addresses);
		
		Content content = new TextContent(
				"A push message");
		PapService papService = new PapServiceImpl();
		PushSDKProperties properties = getProperties();
		HttpClientImpl client = new HttpClientImpl();
		client.setPushSDKProperties(properties);
		papService.setHttpClient(client);
		papService.setPushSDKProperties(properties);
		PushResponse response = papService.push(APP_ID, PASSWORD, APP_ID,
				pushMessageControl, content);
		System.out.println(response.getDescription());
	}

	private static PushSDKProperties getProperties() {
		PushSDKProperties p = new PushSDKPropertiesImpl();
		p.setPublicPpgAddress("https://pushapi.eval.blackberry.com/mss/PD_pushRequest");
		p.setHttpIsPersistent(false);
		p.setHttpConnectionTimeout(60000);
		p.setHttpReadTimeout(120000);
		return p;
	}

 Thanks in advance

Highlighted
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Push Messages Are Not Delivered

Are you testing on a real device or sim? Does the device have BIS access? 

Has the device subscribed to receive pushes? I would suggest performing a subscription query on BPSS to see if the PIN is registered to receive pushes.

If you are using Push Plus you could also query to see whay the push may have failed.

Garett
@garettBeuk
--
Goodbye everybody!