Hey Guys,
I am trying to use the Vibrator service and the RingtoneManager to
simultaneously vibrate the phone and play a ringtone. If I remove the
code to vibrate the phone, my ringtone plays continuously but if I add
the code to also vibrate, my ringtone plays for a short time until the
vibrate starts and the ringtone stops?? I didnt see any way to check
if the phone is vibrating so that I can play the ringtone after the
vibrate finishes. Does anyone know a way around this? Here is the
code Im using:
if (vibrateOnOffValue != VIBRATE_STATUS_OFF)
{
Vibrator v = (Vibrator)
getSystemService(Context.VIBRATOR_SERVICE);
// 1. Vibrate for 1000 milliseconds
long milliseconds = 1000;
v.vibrate(milliseconds);
}
String ringToneURI =
getIntent().getStringExtra(InspireAlarmConstants.ALARM_RINGTONE_PREF_KEY);
rg = getRingTone(ringToneURI);
if (rg != null)
{
rg.play();
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en