Can anyone tell me how can I cause a busy phone state in Android. I'm developing an application about contacts. Help me please, thanks!
Asked
Active
Viewed 3,678 times
0
-
Possible duplicate: http://stackoverflow.com/questions/8815611/how-to-get-a-call-state-of-a-phone – py_script Mar 18 '12 at 14:45
-
He is asking how to make a phone into busy state. Not asking how to get phone state. – Calvin Mar 18 '12 at 14:47
1 Answers
0
You can't.
Modem is the one that is reporting the states, and you can't override this state from Android side.
Even more, modem is always closed proprietary source and is located on a separate silicon (but it might be placed in the same package).
The simplest way to implement a blacklist is to drop the calls. This is what most of the available applications on the market are doing.
Some operator supports blacklisting on their side, in this case you need to know what AT commands are used to add/remove blacklisted numbers.
Cyanogen mod is open source, and they have implemented a blacklist on Android side. If you need a quick reference - have a look there.

Andrejs Cainikovs
- 27,428
- 2
- 75
- 95
-
So you can't actually cause a phone busy state, but if the phone is rooted i'm sure you can fool most Apps into thinking the phone state is busy (i don't know for what use, but...) if they're pulling the info from this class: `android.telephony.TelephonyManager` from this method: `public int getCallState()` if that method always returns this: `CALL_STATE_RINGING` – Ozzy Mar 20 '12 at 17:20
-
I'm not talking about custom rooted solutions. Sure, rooted Android will allow you to replace everything, even your custom built framework jar's. But if you are developing Android app that is supposed to run on rooted phones only - your user share will be less than 2% out of possible 100%. – Andrejs Cainikovs Mar 21 '12 at 09:12
-
@Abdrejs Cainikovs: can you show me path of that application is in Cyanogen mod? – user1277012 Mar 24 '12 at 12:11
-
@user1277012: Blacklist in Cyanogen is implemented in Settings. Probably `package/apps/Settings`. – Andrejs Cainikovs Mar 26 '12 at 07:16