0

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);  

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.