Force alarm sound

by kaloer » Sun, 10 May 2009 03:31:33 GMT

Sponsored Links

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?

Thank you,

Force alarm sound

by Raphael » Sun, 10 May 2009 05:36:10 GMT


AudioManager manager = (AudioManager)
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

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



Sponsored Links

Force alarm sound

by kaloer » Sun, 10 May 2009 15:14:10 GMT

 Thank you, it works.
Yes, I'll let the user choose this feature :)


Other Threads

1. Android jerky UI scrolling question


I've been a fan of android for a very long time--- have had my phone
since about launch. I'm a software engineer and have been coding like
crazy on several apps.

Anyway I have also used my girlfriends iphone significantly. I prefer
Android by far--

However, one thing that irks me is how much more jerky the scrolling/
movement is on Android than the iphone. I did some searching in these
groups-- and only found a few messages of people commenting about the
reasons for this.

Are there plans to address this? How difficult would that be? One
thing that co-workers/friends often say when I show them stuff on
Android is "the iphone scrolls stuff way smoother". I would be
extremely e{*filter*}d about the gui scrolling smooth, for sure. Yeah--- I
know it's a little thing, but what people can see often attracts them
to a device. I choose android because I can do a lot more personally
with it than I can an iphone--- but what about someone who is more
attracted to a pretty phone?

Resources I can read on this issue? I'd appreciate any information.

Thank you


2. MTD and SD/MMC NAND performance on msm?

Anybody able to share timing results for MTD or SD/MMC NAND on msm? 
Random and ordered read and write times at the Linux system call level 
would be most interesting.  Likewise any comparisons of the various I/O 
schedulers or settings of their tuning parameters.

unsubscribe: [EMAIL PROTECTED]

3. OpenGL Troubles on the G1

4. where do control id's get defined.

5. XMLHttpRequest Handling

6. buggy Android phone (Tmobile g1)

7. Zoom problem in OpenGL