Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Can an application make a smartphone silent and then undo it?

silent ios android

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1 jasonalien

jasonalien

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 194 posts

Posted 16 September 2014 - 10:12 AM

Hello there..

 

I'm asking this for both Android phones and iPhone devices.

 

Is it possible for an application to put a smartphone into silent-mode and then back to with-sound-mode?

 

If yes, how hard is it ? :)

 

Thanks.



#2 CommittedC0der

CommittedC0der

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1065 posts

Posted 16 September 2014 - 01:28 PM

Yes, I'm sure its possible in Android.  A simple call to AudioManager.setRingerMode() should work. (see here for example)

 

iPhone looks a little less straight forward.  I'm not entirely sure it's possible (or allowed due to their app store policy), but this may help you move in the right direction: http://stackoverflow...er-tone-on-ios5


Edited by CommittedC0der, 16 September 2014 - 01:32 PM.

There IS a war going on for your mind.
Nothing of eternal significance happens besides prayer.

#3 jasonalien

jasonalien

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 194 posts

Posted 17 September 2014 - 11:57 AM

Thank you very much :)



#4 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 17 September 2014 - 03:58 PM

I agree with CommittedCoder, remember the success of such functions, in Android, depends on the user granting your app permission to manage such modes. So, remember to include that as a requirement in the manifest.xml in order to the app to properly deploy.






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download