The simplest and most consistent way to add sound, light, and vibration to your Notifications is to use the current user default settings. Using the defaults property you can combine:
The following code snippet assigns the default sound and vibration settings to a Notification:
notification.defaults = Notification.DEFAULT_SOUND |
If you want to use all the default values you can use the Notification.DEFAULT_ALL constant.
Was this article helpful?
Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.