【问题标题】:android sinch audio and video calling in backgroundandroid sinch 后台音频和视频通话
【发布时间】:2018-10-03 10:51:38
【问题描述】:

我在当前应用中实现了 Sinch 音频和视频通话。当应用程序在前台时,来电一切正常。但是当我关闭应用程序并尝试接听来电时,它没有显示任何来电。应用关闭来电时如何进行音视频Sinch调用?

【问题讨论】:

标签: android


【解决方案1】:

为此,您需要使用Service 类,并且在服务中您必须为来电和视频编写代码。 为此,您需要在服务类中使用BroadcastReceiver

public class MyService extends Service {
    BroadcastReceiver mReceiver;

    // use this as an inner class like here or as a top-level class
    public class MyReceiver extends BroadcastReceiver {

        @Override
        public void onReceive(Context context, Intent intent) {
            // do something
        }

        // constructor
        public MyReceiver(){

        }
    }

}

【讨论】:

  • 我尝试使用您的答案,但在接收广播接收器时未调用 sinch 呼叫
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多