开发者

Call Blocking in Android 2.3

I am developing an application to block an incoming call but as far as I know in Android 2.3 gingerbread google has disabled the feature of:

<uses-permission android:name开发者_如何学编程="android.permissi​on.MODIFY_PHONE_STATE" />.

So now my app only runs on models below 2.3.

Can any one help me on this topic?


Please see How to grant MODIFY_PHONE_STATE permission for apps ran on Gingerbread for why this permission is unavailable in 2.3 Gingerbread.

It seems like a future release will include this capability as part of a public telephony API, but timeline is unknown: See issue http://code.google.com/p/android/issues/detail?id=54

A possible hacky work-around is turning down the volume when an incoming call is received to prevent the ring from being heard, and then bringing it back to the original volume after the ringing is over.


I have implemented it using Audiomanger class.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜