YLS*_*YLS 5 android deprecated phone-call telecom-manager
在我使用下面的代码结束通话之前
val telecomManager = context.getSystemService(Context.TELECOM_SERVICE) as TelecomManager
if (PermissionsUtil(context).checkPermissions()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
telecomManager.endCall()
} else {
//telecomManager.isInCall
declinePhone(context)
}
}
Run Code Online (Sandbox Code Playgroud)
但现在在 API 29 中 TelecomManager.endCall() 显示已弃用。我是否必须创建在后台 CallScreeningService 或 InCallService 中运行的服务?在没有 endCall() 直接方法的情况下,第三方应用程序无法在不成为默认调用方应用程序的情况下执行此操作。如果是这样,那么我将如何获取呼叫详细信息以及如何让我的服务在中国 rom 的后台运行
| 归档时间: |
|
| 查看次数: |
990 次 |
| 最近记录: |