I am writing a simple application that will turn off the ringer for a
period of time and then turn it back on automatically.  I would use
this to turn off the ringer for an hour before a meeting or something,
and then I wouldn't have to remember to turn it back on.

I am using AudioManager.setRingerMode(RINGER_MODE_VIBRATE) to set the
phone to vibrate.  I am using AlarmManager with a PendingIntent to set
the ringer mode to RINGER_MODE_NORMAL after a delay.

I would like my application to be aware if the user is changing the
ringer on/off with the volume keys or some other system setting.  If
the user turns the ringer back on by them self, then I want to detect
this and cancel the my broadcast with the AlarmManager.

How can I detect if the volume is changing?  Is there some intent I
should register for?  Is there some sort of onRingModeChanged function
I need to implement?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to