问题标签 [android-connectionservice]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
41 浏览

java - 如何从 Android 上的通话目录运行 voip 应用程序

我开发了一个带有 android ConnectionServices 和电信框架的语音通话应用程序。

当收到来自 firebase 的来电通知时,我可以显示本机通话屏幕,一切都很好。我想添加两个功能;

  1. 当我从目录中选择联系人时,我想选择我的应用程序开始通话并在我的应用程序中获取联系人数据,例如 ios callkit 提供
  2. 当我接到电话时,我的应用程序会创建通话记录,并且我想在通过我的应用程序点击此电话时回电。

有可能用android java做这个吗?

0 投票
1 回答
179 浏览

android - Android Connection Service report outgoing call without showing native call UI?

I have developed a voice calling app with android ConnectionServices and telecom framework.

I can show native call screen when receive incoming call notification from firebase and everything is fine. When I start an outgoing call I just want to report this call to Connection service so that if any call from gsm received it should report busy to caller. In callkit if you call reporting Outgoing call native callkit screen doesnt appears on my app screen but android shows native call. is it possible to make native screen invisible for outgoing calls?

my function to report outgoing call is below;

and overrided outgoingConnection in Service class is like below.

any idea will be appriciated.

0 投票
1 回答
19 浏览

android - Flutter:如何添加本地来电屏幕并希望在有人接听电话时播放预先录制的音频

我想实现一个本地呼叫者屏幕,并希望将它与 FCM 连接起来。但是,在来电者屏幕上,我想播放附加到我的应用程序的音频。那可能吗?

我正在尝试颤振 callKeep。但它在 android 11 上无法正常工作,也无法播放预先录制的音频。

0 投票
0 回答
33 浏览

android - 如何使用自我管理的 ConnectionService 接听来电

我一直在使用 Kotlin 在 Android Studio 中构建一个独立的呼叫应用程序tutorialhttps ://developer.android.com/guide/topics/connectivity/telecom/selfManaged

我已经实现了所有必要的东西,并多次阅读了整个文档,但我仍然无法让我的代码正常工作。我遇到的问题是接听来电和拨打电话。

传入调用:根据 Logcat,每个函数都以正确的顺序调用。但是,当有来电时,我总是会收到以下信息:

I/TelecomFramework: CallHandler: reject TC@71_1: (...->CSW.hCCC)->CS.r->H.CS.r(cet/cast/cast)@E-E-E-Bn0

I/TelecomFramework: CallHandler: notifyCreateConnectionComplete TC@71_1: (...->CSW.hCCC)->CS.crCoC->H.CS.crCoC(cet/cast)@E-E-E-Bn0

CallHandler是我实现的类之一,它扩展了ConnectionService. 该类中没有拒绝呼叫的函数或命令(如信息中所示)。当我尝试使用call.answer()或接听电话时connection.setActive(),应用程序崩溃且没有任何错误消息。我已经尝试过调试以及我想到的所有其他事情,但我找不到解决方案。

拨出电话:我真的不知道为什么这不起作用,似乎连连接都没有建立。再次以正确的顺序调用每个函数,我没有收到任何错误消息。我得到以下信息:

I/TelecomFramework: CallHandler: notifyCreateConnectionComplete TC@173_1: (...->CSW.hCCC)->CS.crCoC->H.CS.crCoC(cast)@E-E-E-gX

I/TelecomFramework: CallHandler: onAudioStateChanged TC@173_1 [AudioState isMuted: false, route: EARPIECE, supportedRouteMask: EARPIECE, SPEAKER, activeBluetoothDevice: [null], supportedBluetoothDevices: []]: CS.cASC->H.CS.cASC@AAE

这是CallHandler课程:

我已经删除了onCreateIncomingConnectionFailed(和传出的)功能,因为它们所做的只是展示祝酒词。是在其 initCallConnection()中扩展connection和设置的类。connectionProperties = PROPERTY_SELF_MANAGED

我真的很感激任何帮助。我一直在寻找这个问题好几天了,但没有找到原因或解决方案。