如何在Flutter应用程序中录制Android上的内部音频?

huangapple go评论119阅读模式
英文:

How to Record Internal Audio in a Flutter App on Android?

问题

我正在开发一个Flutter应用程序,需要能够录制内部音频,例如来自其他应用程序或设备系统声音的音频,在Android设备上。我已经研究了这个话题,但我发现在不使用危险的做法,比如对设备进行root处理的情况下,很难找到可靠的方法来实现这一点。

在Flutter应用程序中,是否有非root解决方案或安全的方法来录制Android上的内部音频?我意识到围绕这一功能存在隐私和安全顾虑,我希望确保我的应用程序遵守所有准则,并尊重用户的隐私。

如果在Flutter中无法录制内部音频,是否有推荐的解决方法或外部库,我可以与Flutter一起使用来实现这个功能?

我会感激任何能帮助我在我的Flutter应用程序中实现内部音频录制的见解、代码示例或指向相关资源的指导,同时遵守最佳实践,确保用户体验流畅。

提前感谢您的帮助!

英文:

I am working on a Flutter app that requires the ability to record internal audio, such as audio playing from other apps or the device's system sounds, on Android devices. I have researched the topic, but I'm finding it challenging to figure out a reliable way to achieve this without resorting to risky practices like rooting the device.

Is there a non-root solution or a safe method to record internal audio in a Flutter app on Android? I'm aware of the privacy and security concerns surrounding this functionality, and I want to ensure that my app complies with all guidelines and respects users' privacy.

If recording internal audio is not possible in Flutter alone, are there any recommended workarounds or external libraries that I can use in conjunction with Flutter to achieve this functionality?

I would appreciate any insights, code examples, or pointers to relevant resources that can help me implement internal audio recording in my Flutter app while adhering to best practices and ensuring a smooth user experience.

Thank you in advance for your assistance!

答案1

得分: 1

在Android中,由于隐私问题,全局录制音频现在已经违反了Google的政策。

默认情况下,除非应用主动设置RECORD_AUDIO权限,否则锁定了每个应用的音频录制功能。
默认情况下,您只能通过Android上的麦克风录制外部音频。

一些来自Android开发者的参考资料:

英文:

Recording global Audio in Android is now against Google's policy due to privacy concerns.

By default, audio recording from every app is locked, unless they actively set the RECORD_AUDIO permission.
By default, you can only record external audio through the microphone on Android.

Some references from Android Developers:

答案2

得分: 1

有一些安卓设备配备了内置通话录音功能。通常情况下,这些功能默认启用,不需要用户授予任何特殊权限。这表明谷歌允许记录通话音频的应用(例如谷歌应用和Web活动),但他们可能不太允许记录其他来源的音频。

我没有找到“由于隐私问题,现在在安卓中全局录音已违反了谷歌的政策”,但这确实变得更加困难。

请查看Mitchell Clark的文章,标题为《Google’s crackdown on third-party Android call recorders may finally be complete》:谷歌正在修改其Play商店政策,以制止通话录音应用程序使用的绕过方法,可能会关闭允许这些应用程序存在的最后一个漏洞。在5月11日,一项明确规定,即“无法请求远程通话音频录制的无障碍API未设计用于此目的”,将生效,从而使应用程序无法录制通话的音频。

此外,请查看Steve Dent的文章,标题为《Google is banning third-party call recording apps from the Play Store》:开发人员从5月11日开始将无法使用无障碍API进行通话录音。

英文:

There are a number of Android devices that come with built-in call recording features. These features are typically enabled by default, and they don't require users to grant any special permissions. This suggests that Google is okay with apps that record audio from calls (like Google apps and Web activity), but they may be less okay with apps that record audio from other sources.

I did not find that "Recording global Audio in Android is now against Google's policy due to privacy concerns", but it sure is harder.

See Google’s crackdown on third-party Android call recorders may finally be complete by Mitchell Clark:

> Google is changing its Play Store policy to clamp down on a workaround that call recording apps were using, potentially closing the final loophole that allowed these apps to exist (via NLL-Apps on Reddit). On May 11th, a rule clarifying that “the Accessibility API is not designed and cannot be requested for remote call audio recording” will go into effect, making it so that apps won’t be able to record audio from a call.

And see Google is banning third-party call recording apps from the Play Store from Steve Dent: Developers can't use the Accessibility API for call recording starting May 11th.

huangapple
  • 本文由 发表于 2023年8月4日 23:33:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76837348.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定