Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

make phone beep, vibrate on success

Hi,
I am trying to make the phone beep on success, this is what I did

on component
sendgrid_mailsend, success, run js, navigator.notification.beep(2);

I get "undifined" in firebug,
can you help me fix this,

thanks in advance

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

make phone beep, vibrate on success

Needs to run on the actual device (as hybrid app), won't work in the browser.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

make phone beep, vibrate on success

Thanks for the info Max,
ran app on iphone 4s ios 6.01, didn't work, here is a screenshot,
I get the successor error message from

code var response = JSON.parse(jqXHR.responseText);

if (response.message == 'success') {
alert ('Thank You for Your Booking, a text message with your Taxis details will follow shortly..');
}
else if ( response.message == 'error') {
var error = response.errors[0];
alert ('Error sending email.\n'+error+'.');
}codeImage /code

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

make phone beep, vibrate on success

Try the beep without any additional code, just run the beep on button click to make sure it works.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

make phone beep, vibrate on success

Yep Max,
your right works on click,
so is there a way to run this script after or with the error and success js alert.

I wanted to run vibration on error and beep on success

thanks for the info

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

make phone beep, vibrate on success

Test to make sure first which if-statement you run...

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

make phone beep, vibrate on success

both if statments are in the plugin and action is on complete, I was hoping to set these two indicators, one on success and the other on error

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

make phone beep, vibrate on success

I meant, are you sure those callbacks are invoked, even without the beep?

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

make phone beep, vibrate on success

yes Max,
I always get a success or error message when sending the message, all works perfectly,
I just wanted to add an audio or vibe notification depending on result

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

make phone beep, vibrate on success

So, just beep on click works but doesn't work in service callbacks?

Return to “Issues”