- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I make simple app in Intel XDK and I would need show alert and play sound when app is in background or device is locked.
I tried all possible ways, but no working.
Only this works:
navigator.notification.vibrate() navigator.notofication.beep()
Can someone help me?
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to 'schedule' the background message with a 3rd party plugin.
This is a plugin that I have used in the past that works well.
https://github.com/katzer/cordova-plugin-local-notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for answer,
I download this cordova plugin, but not working.
I installed plugin by this tutorial --> https://software.intel.com/en-us/xdk/docs/adding-third-party-plugins-to-your-xdk-cordova-app
I used Local Plugin Import.
Should I use some special directory to extract plugin?
Should I write something somewhere?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All you need is to include the extracted plugin within your project directory and point to its location when importing it. Call the plugin methods from your project. There is a kitchen sink sample you can refer to: https://github.com/katzer/cordova-plugin-local-notifications/wiki/11.-Samples
The sample illustrates scheduling a notification, scheduling repeat notifications etc.
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page