从 EndCall 事件接收回调

发布于 2024-12-19 16:32:29 字数 132 浏览 4 评论 0原文

我正在开发的应用程序需要知道何时有人按下“结束通话”按钮。它根本不需要改变按钮的功能。它只需要知道何时按下即可。我只是想知道这是否可能以及如何做到这一点?

我一直在研究 KeyEvent 类,但无法实现它。我什至不知道它是否会起作用。

The app I am developing needs to know when someone presses the End Call button. It doesn't need to alter the button's function at all. It merely needs to know when it is pressed. I would just like to know if this is possible and how to do this?

I have been looking at the KeyEvent class, but I am unable to implement it. I don't even know if it will work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

红焚 2024-12-26 16:32:29

我高度怀疑你可以做到这一点......捕获密钥不在您的应用程序中的事件只是恶意代码。


也许您有兴趣知道呼叫是否已终止?

如果是这样:使用 PhoneStateListener检测来自 CALL_STATE_RINGING/CALL_STATE_OFFHOOKCALL_STATE_IDLE

I highly doubt you can do this ... trapping key events that are not in your application is just malicious code.


Maybe you are interested in knowing if a call has been terminated?

If so: use the PhoneStateListener to detect state transitions from CALL_STATE_RINGING/CALL_STATE_OFFHOOK to CALL_STATE_IDLE

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文