3

我已经完成了从 twilio 客户端 SDK 到应用程序调用的所有注册步骤,并且我已经成功地与两台设备建立了通话。我对 twilio 客户端 SDK 与我们的服务器设置集成感到满意。

成功连接后,请参阅下面的日志。

06-15 10:27:41.268 12325-12742/com.twilio.client.quickstart D/CallControlManager: account information : com.twilio.client.impl.session.Account@ca8c233
06-15 10:27:41.268 12325-12742/com.twilio.client.quickstart D/CallControlManager: onRegistrationState for Account id: 1
06-15 10:27:41.269 12325-12742/com.twilio.client.quickstart D/CallControlManager: RegistrationInfo Code 200
06-15 10:27:41.269 12325-12742/com.twilio.client.quickstart D/CallControlManager: RegistrationInfo success true
06-15 10:27:41.269 12325-12742/com.twilio.client.quickstart D/CallControlManager: RegistrationInfo expiration 100
06-15 10:27:41.269 12325-12742/com.twilio.client.quickstart D/CallControlManager: Client registered successfully

来电时请参阅下面的日志(应用程序处于打开/运行状态)

06-15 10:27:59.089 12325-12742/com.twilio.client.quickstart D/CallControlManager: onCallSDPCreated notification received
            06-15 10:27:59.098 12325-12742/com.twilio.client.quickstart D/CallControlManager: Incoming call notification received
            06-15 10:27:59.103 12325-12742/com.twilio.client.quickstart D/MediaManager: playing sound INCOMING as id 1
            06-15 10:27:59.108 12325-13082/com.twilio.client.quickstart D/AwesomeSoundPoolPlayThread: play thread starting
            06-15 10:27:59.115 12325-12325/com.twilio.client.quickstart E/ClentActvity: onResume
            06-15 10:27:59.122 12325-12325/com.twilio.client.quickstart E/ClentActvity: device :com.twilio.client.impl.DeviceImpl@57a00d9
            06-15 10:27:59.122 12325-12325/com.twilio.client.quickstart E/ClentActvity: incomingConnection :com.twilio.client.impl.InternalConnectionImpl@20aaa9e

一切正常,现在我需要有关如何在 My Bellow Case 中管理应用程序到应用程序调用的帮助:

  1. 当应用程序关闭时。
  2. 当应用程序被杀死时。
  3. 令牌过期时。

先谢谢了。

4

1 回答 1

3

1-2: At the moment, the Android SDK does not provide callback handlers for device state change.

You can receive events from the DeviceListener and handle those accordingly.

  1. Some people choose to generate a new token for every call or every so often. But you'll know a token is expired upon receiving the 31205 error.
于 2016-06-17T00:02:45.767 回答