4

I made a sort of mp3 player but I wanted to add a functionality. I don't want to be disturbed by a call or a message while the music is playing. I already thought about 3 options, but they all have issues:

  • Enable and disable airplane mode: My first idea, but when I switch to airplane mode and switch back to normal, the phone will ask me to enter my pin code... That's not an option for me.

  • Enable silent mode: that was a good idea but when I get a call, even if the phone is in silent mode, the music is stopped...

  • Enable call forwarding: I couldn't find a simple way to do that...

So here are my questions:

Can I enable call forwarding easily (programmatically)?
Do you see another way to be peaceful when I'm playing an mp3?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
JuLink
  • 41
  • 1
  • It might help you: [this answer use a BroadcastReceiver](http://stackoverflow.com/a/9904826/2668136), [this one prevents the incoming message](http://stackoverflow.com/questions/9378431/how-to-block-an-incoming-message-in-android) and [this is to prevent incoming calls](http://stackoverflow.com/questions/2334465/block-incoming-calls/6841757#6841757). I hope this will be useful, good luck. – Blo Apr 09 '14 at 11:29

0 Answers0