11-11-2010 08:05 PM
I thought I would post some code to show how I use the Push SDK low level JARs to push content. Other than List and ArrayList the rest of the classes are all from the SDK:
IdGenerator idGenerator = new IdGeneratorImpl();
List<String> addresses = new ArrayList<String>();
addresses.add("<put device PIN here>");
PushMessageControl pushMessageControl = new PushMessageControl(idGenerator,
pushAppId, addresses);
Content papContent = new TextContent("Information I want to push here");
PushResponse response = papService.push(pushAppId, password, pushAppId, pushMessageControl, papContent);
06-09-2011 08:19 PM
IdGenerator idGenerator = new IdGeneratorImpl();
List<String> addresses = new ArrayList<String>();
addresses.add("<put device PIN here>");
PushMessageControl pushMessageControl = new PushMessageControl(idGenerator,
pushAppId, addresses);
Content papContent = new TextContent("Information I want to push here");
PapService papService = PapBeanLocator.getPapService();
PushResponse response = papService.push(pushAppId, password, pushAppId, pushMessageControl, papContent);