dodevelopnshare


9 Comments

Blackberry Push Technology

What is Push Technology?

http://en.wikipedia.org/wiki/Push_technology

An Overview of Push Technology in Blackberry Platform

https://developer.blackberry.com/services/push/

Some important information related to Push APIs

http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Push-SDK-using-low-level-APIs/td-p/1173007

Basically, we need a Client-Side Application tolisten for Push Messages and a Server-side Application to fire Push Messages.

Server Side Push Application 

private static String password = “Your password here”;

private static String targetURL = “https://pushapi.eval.blackberry.com/mss/PD_pushRequest”;

private static final String APP_ID = “your app id here”;

public static void main(String[] args) throws PushSDKException, BadMessageException, UnauthorizedException {

org.apache.commons.codec.binary.Base64 b6;

//net.rim.pushsdk.acknowledgement.NotificationProcessorServiceImpl nsi;

IdGenerator idGenerator = new IdGeneratorImpl();

List<String> addresses = new ArrayList<String>();

String data = “this is a test message – 2”;

System.out.println(“Data is: ” + data);

addresses.add(“your PIN here”);

PushMessageControl pushMessageControl = new PushMessageControl(idGenerator, APP_ID, addresses);

Content content = new TextContent(data);

PapService papService = new net.rim.pushsdk.pap.PapServiceImpl();

PushSDKProperties properties = getBBProperties();

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 getBBProperties() {

PushSDKProperties p = new PushSDKPropertiesImpl();

p.setPpgAddress(targetURL);

p.setHttpIsPersistent(false);

p.setHttpConnectionTimeout(60000);

p.setHttpReadTimeout(120000);

p.setUsingXmlParserDtdValidation(false);

return p;

}

Client Side Application

http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Simplified-BIS-Push-client-sample/ta-p/693857

Advertisements

Blackberry 10 JAM Delhi and Blackberry 10 Dev Alpha

Leave a comment

After a long time, I am back with lots of things to share.. As being an Indian I love sweets and so will like to Shri Ganesh with some delicious experience..!!

 Blackberry 10 JAM World  Tour – Delhi

Registration –  I registered for the event, and was very curious to explore the BB10 insights. Also, I have applied for the most awaiting and game changing BB10 Dev alpha Device.

Qualified for BB 10 DEV Alpha Device – I was at office on my desk wrapping up all the tasks, as I was on leave tomorrow and today lots of things were to finish. Suddenly, I checked my mail and was cheered up to have a mail from RIM (4:51 PM) mentioning, that I have been qualified for the device. It was so special when everybody in my office started congratulating me for this..!!

Event – This event held at Delhi on July 4th, 2012.  It was an event organized by RIM for the persons having interest in Blackberry Platforms which was hosted by the Blackberry Developers Relation Team. When I reached there at 8:30 there were CEO’s, Managers, Business Associates, Developers and many more all around with Blackberry developer Relations Team. It was nice to be there..!! 🙂

Event was kick started by Sarim Aziz,  Head of Developers Relations, Asia Pacific RIM. Annie Mathew, Head of Alliances for India highlighted the important contribution of thousands of Indian developers to build apps for entire globe. Alec Saunders then took the stage after an amazing number, and the energy in the room went boom..!! Krishnadeep Baruah, RIM India’s Head of Marketing, who took the devs through the BlackBerry 10 UX and Next, Alan Wong giving the audience a taste of the BlackBerry 10 architecture. It wasn’t just talk, as Alan showcased some interesting demos and samples. It was a whole day event and was quite interesting to have some wonderful facts..!!

This slideshow requires JavaScript.

At the end of the event, Qualified developers were rewarded with Blackberry 10 dev Alpha Device, Of course I also was lucky to count among them 🙂

It was an excellent event. Thanks RIM for organizing such events..!!

This gallery contains 15 photos