Flutter文件读写权限Android版本13

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

Flutter File Read Write Permission Android Version 13

问题

你好!以下是你要翻译的内容:

如何在Flutter中在Android 33及以上的手机上写文件。我需要获取写入权限。现在,它只显示为被拒绝。

我想知道如何使用Flutter在Android 13及以上的手机上请求文件读写权限。

英文:

How can I write file in Flutter abive android 33 phone. I need to get the permission for write. Now , its show only denied.

I want to know how to ask to get permission for file read write with flutter for above android 13 phones

答案1

得分: 1

READ_EXTERNAL_STORAGEWRITE_EXTERNAL_STORAGE权限已被标记为弃用,并在Android SDK 33(Android 13)中完全移除/禁用。

如果您的应用程序需要访问媒体文件,Google建议改用READ_MEDIA_IMAGESREAD_MEDIA_VIDEOSREAD_MEDIA_AUDIO权限,而不是读写权限。要请求这些权限,请确保android/app/build.gradle文件中的compileSdkVersion设置为33。

英文:

READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions have been marked deprecated and have been fully removed/ disabled since Android SDK 33 (Android 13).

If your application needs access to media files Google recommends using the READ_MEDIA_IMAGES, READ_MEDIA_VIDEOS or READ_MEDIA_AUDIO permissions instead Read and Write permission. To request these permissions make sure the compileSdkVersion in the android/app/build.gradle file is set to 33.

huangapple
  • 本文由 发表于 2023年7月27日 18:05:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76778645.html
匿名

发表评论

匿名网友

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

确定