I tried posting this on the Android Developers list and didn't hear anything - maybe some of you have insight into this!
I'm working on an app that should have the ability to disable incoming calls for a user-specified period of time. It should work much the way a "DND" (do not disturb) button works on an office phone.
I've looked over the SDK, and I can't find any way to send phone calls to voicemail or disable the big incoming call screen without putting the phone in airplane mode. That would be OK if I could keep Bluetooth enabled. (I'd like the user to be able to listen to music via a Bluetooth headset while phone calls are blocked.)
In summary, any of the following would work if I could do them from my app:
1) Programmatically send all calls to voicemail (like a "DND" button) - this would be ideal since it would still be in the call log at the end of the "do not disturb" time.
2) Intercept the incoming call in my app and bounce it.
3) Disable all radios but Bluetooth and Wi-Fi - This has the disadvantage of losing the call log.
4) Prevent the built-in phone call app from displaying its incoming call screen (I can disable the ringer and vibration) even though the call is received
Is any of these possible? Or maybe another approach I haven't thought of?
Just a side note: For Android phones to be the best possible productivity tool, it should be possible to use a device for email/ Internet/apps without receiving constant interruptions from calls. Humans have a significant context-switch time.
Thanks,
Steve@WhitneyApps