如何在通过网络拨打电话时打开活动

如何在通过网络拨打电话时打开活动

本文介绍了Twilio - 如何在通过网络拨打电话时打开活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的应用程序中实现了 Twilio,并且已经实现了网络到网络的通话以及网络到电话的通话.唯一的问题是,如果我用我用户的电话号码呼叫 Voice.call(),它会呼叫他,但呼叫不会在他的设备上打开我的活动.电话呼叫 UI 将是来电的默认决定 UI.另一方面,如果我在他的设备上使用用户定义的身份,它会通过我的活动顺利进行.关于如何让网络使用电话号码拨打电话并通过我的活动重定向电话的任何想法?

I have implemented the Twilio in my app and have made it so that web to web calls can be made and also web to phone calls. The only thing is that if I call Voice.call() with my user's phone number, it'll call him but the call will not open my activity on his device. The phone call UI will be the default decide's UI for incoming calls. If I, on the other hand, use the user's defined identity on his device, it'll go nicely via my activity.Any ideas on how I can make the web to phone call using a phone number and redirect the call via my activity?

我一直找不到这方面的任何文档.

I have been unable to find any documentation in this regard.

干杯!

推荐答案

Twilio 开发人员布道者在这里.

Twilio developer evangelist here.

截取直接拨打设备的电话不是 Twilio SDK 的工作.不过,由于 Android 足够灵活,可以替换默认的手机应用程序,因此您可以自行完成.

It's not the job of the Twilio SDK to intercept phone calls made directly to the device. However, since Android is flexible enough to replace the default phone application, you can do this yourself.

不过,我不是 Android 开发人员,但快速搜索后我找到了 本教程使用BroadcastReceiver 在来电时运行您自己的代码.此 StackOverflow 答案 可能对您有所帮助也开始吧.

I am not an Android developer however, but a quick search around lead me to this tutorial on using a BroadcastReceiver to run your own code when an incoming phone call occurs. This StackOverflow answer might help you get started too.

希望有所帮助.

这篇关于Twilio - 如何在通过网络拨打电话时打开活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 02:19