Thank you, it works.
Yes, I'll let the user choose this feature :)
On 9 Maj, 23:35, Raphael <[email protected]> wrote:
> On Sat, May 9, 2009 at 12:31 PM, kaloer <[email protected]> wrote:
>
> > Hi,
>
> > Is it possible to force the volume up? I have an alarm that should
> > wake the user even if the phone is on silent mode.. Is that possible?
>
> AudioManager manager = (AudioManager)
> mContext.getSystemService(Context.AUDIO_SERVICE);
> int max = manager.getStreamMaxVolume(AudioManager.STREAM_RING);
> manager.setStreamVolume(AudioManager.STREAM_RING, new_volume, 0 /*flags*/);
>
> See the AudioManager API for more details, especially which stream to
> use and of course you might have to change the ringer mode, cf
> manager.setRingerMode(AudioManager.RINGER_MODE_NORMAL).
>
> Please be nice to the user: only do so if the user checks a pref to
> allow your app to modify his/her settings and remember to revert the
> volume to what it was before ;-)
>
> R/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---