Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Code under callback part of registerForPushNotifications does not work well.

$
0
0

Hi all, I'm using registerForPushNotifications for registering iphone push notification. Basically, it works very well.

However, my issue is, I cannot understand why if I add any additional lines such as Ti.API.info('any thing here'); then all codes under callback will not work.

Below is my code that work with callback only show an alert box. Does any one know how to add more code into callback part?

Titanium.Network.registerForPushNotifications({ types: [ Titanium.Network.NOTIFICATION_TYPE_BADGE, Titanium.Network.NOTIFICATION_TYPE_ALERT, Titanium.Network.NOTIFICATION_TYPE_SOUND ], success:function(e) { //** }, error:function(e) { //** }, callback:function(e) { var msg =''; if (e.data && e.data.alert) msg = e.data.alert; if (e.data.alert.body) msg = e.data.alert.body; var a = Ti.UI.createAlertDialog({ title:'', message:msg,
}); a.show(); } });


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>