Push Notifications
I have implemented push notifications with urban airship in an app, the problem I have is that I would like to give the user the option in the app settings to turn them on and off.
How do you turn off push notifications?
I tried the following, assuming that the lack of listed services would be the answer but it didn`t work.
Titanium.Network.registerForPushNotifications({
types: [
],
success:function(e)
{
},
error:function(e)
{
Titanium.UI.createAlertDialog({title:'Pure Acquisitions', message:'It has not been possible to turn off Push Notifications. ' + e.error}).show();
},
callback:function(e)
{
}
});
3 Answers
-
I also have the same question.
I was wondering if the way to do it is to turn it off at the server that is actually talking to Urban Airship. If you remove the device ID from the call to UA a push notification wouldn't be sent.
Does this make sense?
Thanks,
gt -
You must create a xhr request sending Titanium.Network.remoteDeviceUUID to the API of urbanairship
this way you will be able to delete (or re-register) an iPhone
-
Give a try to my Titanium Module : PushClient
I works with iOS (APN) and Android (GCM).