简体   繁体   English

在iOS上录制音频的权限

[英]permission to record audio on iOS

I am writing an app that records an audio file from the user. 我正在编写一个记录用户音频文件的应用程序。 I noticed that when other apps that do something similar are installed, a window is displayed, warning the user that the app wants to access the microphone, and the user has to explicit give permission to the app to do so. 我注意到,当安装了其他执行类似操作的应用程序时,会显示一个窗口,警告用户该应用程序要访问麦克风,并且用户必须明确授予该应用程序访问权限。

Does Qt have any API that tells iOS about the intention of the app to access certain devices, which would cause that warning window to be displayed? Qt是否有任何API告诉iOS应用程序访问某些设备的意图,这将导致显示警告窗口?

Thanks! 谢谢!

You don't have to handle it manually . 您不必手动处理它 iOS will automatically ask for permission if the user didn't accept it before. 如果用户之前不接受, iOS会自动请求许可。

The very first time your app will need microphone, an alert will be displayed. 您的应用第一次需要麦克风时,将显示警报。 If the user allows it, he will never see the alert again. 如果用户允许,他将永远不会再看到警报。 If he refuses, he will have to turn it ON manually in iOS settings . 如果他拒绝,则必须在iOS settings手动将其ON Nevertheless, there's maybe a way to handle a previous refusing in-app. 不过,也许有一种方法可以处理以前拒绝应用内的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM