本文介绍了如何获取拨出通话时间与Twilio客户为例API中的Andr​​oid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Andr​​oid应用程序开发的Twilio SDK。对于传出和传入它运作​​良好。但是,当我尝试设置为通话时间定时器,我是无法从其他设备的通知。有没有找出其它设备(这是捡了电话后通知)的方法?

I have developed Twilio SDK in my Android application. For outgoing and incoming it is worked well. But when i try to set the timer for call duration, i am unable to get the notification from the other device. Is there any method to find out the other device(Which was notified after picking the call)?

请帮我在这。

谢谢,

推荐答案

我不知道,如果你还需要这方面的帮助或没有,或我刚好得到您的问题。

I'm not sure if you still need help with this or not, or I get exactly your issue.

我在做什么是保持通话时在任何的客户端开始(呼入/呼出)的时间戳。然后在我的活动/片段,因为我有我自己的回调为Twilio的事件,只要我知道有一个叫回事,我用的这就好比一个TextView,一旦你设定一个基准时间,并启动它会自动将输入的东西链接描述。

What I'm doing is keeping the timestamp of when the call was started (incoming/outgoing) in any of the clients. Then in my activity/fragment, since I have my own callbacks for the Twilio events, as soon as I know there's a call going on, I use enter link description here which is like a TextView that automatically sets things as soon as you set a base time and start it.


  1. 获取时开始呼叫时间戳

  2. Chronometer.setBase(时间戳);

  3. Chonometer.start();

因此​​,它示出的持续时间。请记住,有自己的Twilio管理器类,所以如果你离开你的活动,并回过头来保持你的价值,持续时间将正确显示。

So it shows the duration. Remember to have your own Twilio manager class to hold that value for you so if you leave your activity and come back, the duration will be displayed correctly.

好运气

这篇关于如何获取拨出通话时间与Twilio客户为例API中的Andr​​oid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 14:54