哪些权限,需要以编程静音的电话,从后台应用程序? [英] What permissions are needed to programmatically mute a phone call, from a background app?

查看:325
本文介绍了哪些权限,需要以编程静音的电话,从后台应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序发生在用户的Andr​​oid手机后台运行,当用户在一个电话,说有人放置在用户的讲话。在某一点上,我的应用程序想灭口从电话的音频和发挥自己的音频。此外,我想做到这一点无需中断用户的语音。

I have an Android app that happens to be running in the background on the user's Android phone, while the user is speaking on a phone call that someone placed to the user. At a certain point, my app would like to silence the audio from the phone call and play its own audio. Moreover, I'd like to do this without disrupting the user's speech.

什么权限我的应用程序需要有,要做到这一点?是否有可用的第三方应用程序的任何权限足以让我的应用程序做到这一点?

What permission does my app need to have, to do this? Is there any permission that's available to third-party apps that is sufficient to let my app do this?

看起来 AudioManager.setStreamMute(STREAM_VOICE_CALL,真)将静音与语音呼叫音频输出。但我不能告诉这需要什么权限:它没有Android的API文档中列出,或在的Pscout容许图。另外,我不知道是否有使用在后台运行的应用程序这个API,在Android上的任何版本。

It looks like AudioManager.setStreamMute(STREAM_VOICE_CALL, true) will mute the audio output from the voice call. But I can't tell what permission this needs: it's not listed in the Android API documentation, or in the Pscout permission map. Also, I can't tell if there any restrictions on using this API from an app running in the background, on any version of Android.

(如果问题说法是不明确的:。爱丽丝已经安装了我的应用程序在手机上鲍勃呼吁爱丽丝拿起电话,在谈论鲍勃在某一点上,我的应用程序要完全静音Bob的声音及发挥自有音频剪辑代替,所以爱丽丝听到音频剪辑,而不是任何鲍勃说不过,我不希望关掉麦克风Alice的电话:如果Alice在说什么,那应该仍然在回升通话和鲍勃应该仍然能听到它的电话。)

(If the problem statement wasn't clear: Alice has installed my app on her phone. Bob calls Alice. Alice picks up the call and is talking to Bob. At a certain point, my app wants to completely mute Bob's voice and play its own audio clip instead, so Alice hears the audio clip instead of anything that Bob says. But, I don't want to turn off the microphone on Alice's phone: if Alice is saying anything, that should still be picked up over the call and Bob should still hear it on the phone call.)

推荐答案

您可以试试:android.permission.MODIFY_AUDIO_SETTINGS

You can try: android.permission.MODIFY_AUDIO_SETTINGS

这篇关于哪些权限,需要以编程静音的电话,从后台应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆