tags:

views:

768

answers:

1

Are the following actions possible using the latest version of the Android API?:

  1. Temporarily disable sending text messages

  2. Temporarily disable receiving text messages

    *Ideally, I would intercept them and queue them up for later delivery.

  3. Temporarily disable incoming calls except from certain phone numbers

  4. Temporarily disable outgoing calls except to certain phone numbers

+3  A: 

You can turn on airplane mode, which disables all radios.

Beyond that, none of what you wish to do appears possible from an ordinary Android application.

CommonsWare
Hrm. That's a shame.So getting a ServiceState object and calling SetState(STATE_EMERGENCY_ONLY) wouldn't restrict inc/out calls or messages? http://developer.android.com/reference/android/telephony/ServiceState.html
cakeforcerberus
You can try that -- I hadn't looked there (too many classes with settings, too little time). I suspect, though, that you need a permission that only firmware applications can have. But, that's just a guess.
CommonsWare
I'll give it a shot and post the results.
cakeforcerberus
I'm going to accept your answer as I don't know when I'll get a chance to test this out. I'll post if the ServiceState object does indeed allow you to control this though. Thanks for the help.
cakeforcerberus