开发者

How to run a program before answer a call in android?

开发者 https://www.devze.com 2023-03-31 01:24 出处:网络
I want to write a program in android will ask for a password when an incoming call is detected.The program will only allow the call to be answered if the password is 开发者_开发百科correct.

I want to write a program in android will ask for a password when an incoming call is detected. The program will only allow the call to be answered if the password is 开发者_开发百科correct.

How should I implement that?

For example, I found a program that does this: App Lock

...but I have no idea where I should start. Should I write a service?

Thanks and regards.


This may help you: http://www.tutorialforandroid.com/2009/01/get-phone-state-when-someone-is-calling_22.html

You have to register a broadcast receiver in order to catch the events (call ringing, etc, etc..) and based on the various states, you can perform any operations you may want.

Also check this link: How to block calls in android

0

精彩评论

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