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 protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/anjo%40krank.net
>> 
>> This email sent to [email protected]
> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to