开发者

Android - How to allow the application to end a phone call

开发者 https://www.devze.com 2022-12-16 04:20 出处:网络
There is way to allow the application to make a phone call using startActivity(new Inte开发者_高级运维nt(Intent.ACTION_CALL, Uri.parse(toDial)));

There is way to allow the application to make a phone call using

startActivity(new Inte开发者_高级运维nt(Intent.ACTION_CALL, Uri.parse(toDial)));

My question is, Is there any way to end the phone call through application, More specifically I need to try like end the call as soon as i get the call.

Cheers, Vinayak


This is not possible, as it would be a security violation.


Here is an open issue ("reviewed and accepted") for the ability to programmatically reject a call on the standard framework. Of course, if you modify the framework you can do this sort of thing already: CyanogenMod includes a modified Phone.apk with a blacklist feature.


Expanding on this question: Is there a way to create a secondary program that runs with the main phone program that would allow you to do another action either simultaneously as the call ends or immediately prior to the call ending.

Like, sending a pre-programmed text message to that person with an attachment and the the phone hangs up. Is that possible?

0

精彩评论

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

关注公众号