try the premission: MODIFY_AUDIO_SETTINGS<http://developer.android.com/reference/android/Manifest.permission.html#MODIFY_AUDIO_SETTINGS> Allows an application to modify global audio settings MODIFY_PHONE_STATE<http://developer.android.com/reference/android/Manifest.permission.html#MODIFY_PHONE_STATE> Allows modification of the telephony state - power on, mmi, etc. your code seems to need the premission to audio and phone state
On Sun, Aug 16, 2009 at 11:23 PM, Teo <teomina...@gmail.com> wrote: > > Hi, > > has anyone made the phone silent from code? Is there any permission > needed? I am using this method, but it's doing nothing: > > ((AudioManager) context.getSystemService(Context.AUDIO_SERVICE)) > .setMode(AudioManager.RINGER_MODE_SILENT); > > Thanks, > Teo > > > -- Regards, Michael Leung http://www.itblogs.info http://www.michaelleung.info --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---