Android 中是否可以检测 Whatsapp 语音通话结束?

发布于 2025-01-20 01:31:27 字数 116 浏览 3 评论 0原文

当WhatsApp语音呼叫结束时,我想听。

如果授予该应用程序访问通知侦听器,我可以通过解析通知数据来检测传入的WhatsApp调用,但是当呼叫结束时没有数据。

那么有任何解决方案吗?谢谢。

I would like to listen when Whatsapp voice call ended.

If the app was granted to access notification listener, I can detect an incoming WhatsApp call by parsing notification data but there are no data when a call ended.

So is there any solutions for this case? Thank you.

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

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

发布评论

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

评论(1

草莓味的萝莉 2025-01-27 01:31:27

您还可以检测到呼叫是否正在进行...因为通知每秒都会发布给听众(因为通知持续时间信息更改了
每秒)直到通话结束。只需启动一个计时器过程即可检测到上次检测到WhatsApp调用通知,如果时间大于3秒钟,您可以将其声明为呼叫的结尾并在此处运行代码。

You can also detect if the call is ongoing... because the notification will be posted to the listener every second ( Because the call duration info in notification changes
every second ) until the call ends. Just start a timer process to detect the last time a WhatsApp call notification was detected , and if the time is greater than 3 seconds, you can declare that as an ending of a call and run your code there.

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