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. sdcard - remaining space


sorry if this has already been answered (hard to search for this
is there any way to detect remaining space on the sdcard through the
API? I prefer not to make native or shell calls.


2. Build Environment

We have built an Android run-time on a custom board. We have got touch
screen and QWERTY keyboard running. We would like to integrate Audio,
WAN and WLAN in next step as well as integrate custom hardware.

Can this be done without creating a host system as detailed in For the
development till now, we used 2.6.25 customised for PXA 270 from
Marvell. And borrowed the file system from the Emulator itself.

With that background,
1. Is setting up a host system mandatory? Is there a workaround for
2. Does that have to be Ubuntu?
3. We just want to build the audio related files, can that be without
creating the folder structure mentioned for BUILDING a NEW DEVICE

Thanks in Advance

3. Setting up UDP connections between devices

4. Updated to 1.5 and is not regeneratated

5. Issue: Neither user 10039 nor current process has android.permission.WAKE_LOCK || Rooted Phone || App from SD card || JF image

6. Invoking one apk from another

7. is android:layout_width and android:layout_height manditory attributes