Reputation: 369
I use phonegap - cordova notification and phonegap statusBarNotification plugin. I need run vibrate, beep and statusbarnotofication on one moment, how can i do this?
navigator.notification.vibrate(1000);
window.plugins.statusBarNotification.notify(data.title, data.message);
navigator.notification.beep(1);
Upvotes: 0
Views: 334
Reputation: 5376
When I did this:
window.plugins.statusBarNotification.notify("TITLE", "DATA");
navigator.notification.vibrate(1000);
navigator.notification.beep(1);
It worked fine on an HTC Sensation phone running Android 2.3, and on Nexus 7 running Android 4.2. I could try with other devices if you need. One thing to note is that some devices don't have certain functionality...for example, the Nexus 7 doesn't have vibrate capability, so the code above will only show the Notification and make the beep noise. Also, make sure you have the volume turned up and a ring tone set.
Upvotes: 1