开发者

How to answer calls in android programmatically? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_StackOverflow社区 Closed 12 years ago.

I need programming help to answer the calls in android.


You can be notified of an incoming call by using a PhoneStateListener and implementing onCallStateChanged(int,String). There are 3 states, CALL_STATE_IDLE, CALL_STATE_RINGING and CALL_STATE_OFFHOOK

You will also need to declare the READ_PHONE_STATE permission in your manifest.

But I am not sure if you can automatically answer calls or if this is even advisable. Answering calls without user consent is a serious privacy breach. You might want to keep that in mind.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜