- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have no idea where to put push.on('notification', function(data) in my project. Should it be inside index.html or index_user_scripts.js? Somebody please help...
Thanks,
Joko.
- Tags:
- HTML5
- Intel® XDK
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are no push notification sample apps, but I recommend you study the "hello cordova" and "barcode scanner" and "audio app" samples in order to get familiar with how to write a Cordova app using the XDK. Once you understand how those apps work it should become more clear how to work with other plugin APIs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Paul,
Thanks for your response, actually I have a problem that my app not showing alert as I expected when it receive notifications. Here is my code :
push.on('notification', function(data) { alert(data.title+" Pesan: " +data.message); update_badge_pengumuman(data.count); update_badge_absensi('out'); });
![](/skins/images/872293744008A34B36F8ABF94A46CC66/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page