Re: Just in case question, Apple Push Notification Server
Re: Just in case question, Apple Push Notification Server
- Subject: Re: Just in case question, Apple Push Notification Server
- From: Amedeo Mantica <email@hidden>
- Date: Thu, 28 Jan 2010 20:45:51 +0100
using that googled jar why not create a thing like this....
( mine is just a fast implementation )
import javapns.back.PushNotificationManager;
import javapns.back.SSLConnectionHelper;
import javapns.data.Device;
import javapns.data.PayLoad;
public class ERXAPNSSender {
public static void initializeAPNS(String certificateURL, String passkey) throws Exception {
PushNotificationManager.getInstance().initializeConnection("gateway.sandbox.push.apple.com", 2195, certificateURL , passkey, SSLConnectionHelper.KEYSTORE_TYPE_PKCS12);
}
public static void addDevice(String deviceName,String deviceID) throws Exception {
PushNotificationManager.getInstance().addDevice(deviceName, deviceID);
}
public static void send(String device, String alert, int badge, String sound) throws Exception {
PayLoad simplePayLoad = new PayLoad();
simplePayLoad.addAlert(alert);
simplePayLoad.addBadge(badge);
simplePayLoad.addSound(sound);
Device client = PushNotificationManager.getInstance().getDevice(device);
PushNotificationManager.getInstance().sendNotification(client, simplePayLoad);
}
}
On 28/gen/2010, at 20.40, Anjo Krank wrote:
> Hey cool, I needed that!
>
> Cheers, Anjo
>
>
>
> Am 28.01.2010 um 18:20 schrieb Amedeo Mantica:
>
>> Have we a Framework in wonder for using APNS ??
>>
>> I found this Java library on google code
>>
>> http://code.google.com/p/javapns/
>>
>> Can be use useful to add this in wonder ?
>>
>> Regards
>> Amedeo
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden