08-09-2012 02:35 AM
Hello All,
Can anyone plz provide me sample code for client side application for JDE 5.0?
Server side code would be written in PHP.
I have installed push sdk, but where to find the source code to implement push service in my application?
Don't know from where to start?
Any help would be highly appreciated.
Thanks In Advance.
08-09-2012 09:03 AM
Hi!
For the server-side part (your Push Initiator), here's some documentation on the Push Service SDK:
http://docs.blackberry.com/en/developers/subcatego
Note that the APIs are in Java.
For the client-side part (your push-enabled application), are you looking to write something for BlackBerry 10 or which version of the BlackBerry OS exactly?
Thanks,
Matt
08-09-2012 09:09 AM
Sample code for writing a client side application for JDE 5.0 is provided with the Push Service SDK download:
eg: <PushServiceSDK-insatll dir>\pushsdk-low-level\sample-push-enabled-app\sam
If you are looking for PHP code for your server-side application you can search these forums there are a few posts by other community memebers that have sample code you can use. The Push Service SDK currently is only available for Java server-side applications. If you are looking for the server-side API to the BlackBerry Push Service to implement yourself in PHP see: BlackBerry Push Access Protocol
08-10-2012 07:41 AM
Thanks @mdandrea and @marco_dicesare for reply.
I don't need server side code, its implemented already. My requirement is to write only client side implementation for BB 5.0 to 7.1 (as i mentioned in my post above , JDE 5.0).
For this I searched the forums and implemented these classes from this link
Are These two classes are sufficient ?
For PUSH_PORT = "My port"; BPAS_URL = "http://pushapi.eval.blackberry.com";
APP_ID = "your secret key"; CONNECTION_SUFFIX = ";deviceside=false;ConnectionType=seekrit string";
I enetred push port and app id provided by rim. BPAS_URL is at it is (I haven't changed it) .I tried
1) CONNECTION_SUFFIX = ";deviceside=false";
2) CONNECTION_SUFFIX = ";interface=wifi"; (in case wifi was available )
both .
ConnectionType=seekrit string" don't know about this value.
after calling registerBpas() it throws IoException at httpconnection opening.
Can u plz guide what to do? these two classes are sufficient or i need to include low level apis?
08-10-2012 10:01 AM
Can you show me the full stack trace for the IOException? That might help to debug what is going on.
Thanks,
Matt
08-10-2012 03:05 PM
@kavita038 - I can't comment on those two classes you pulled from the link; they very well may wor. I would recommend you look at the source code for the client sample application I referred to you above. It has been written and tested against different versions of BBOS.
Sample code for writing a client side application for JDE 5.0 is provided with the Push Service SDK download:
<PushServiceSDK-insatll dir>\pushsdk-low-level\sample-push-enabled-app\sam
08-16-2012 12:17 PM
Is there a REST interface to the push initiator that can be used?
08-16-2012 12:24 PM
You write the push initiator so you can define whatever interface you want between your hand held application and server-side application. The SDK sample apps show just using vanilla HTTP requests.
The interface between the push intiator and BlackBerry Push Service is PAP XML only at this time.
08-16-2012 02:58 PM
08-16-2012 03:03 PM
You must write an application (server-side) that initiates the push request messages to the BlackBerry Push Service.