-1

i am working on a xamarin forms App, using media storage for reading and writing a txt file. Sometimes i have scenario to access the file from external storage. I have a scenario where i have to create an txt file in a specific path. The issue is code runs without exception but file is not getting generated.

Meanwhile app got rejected saying that ,All access permission should be granted only when there is required.

This happens higher API versions i.e, API>=30, Attaching error report by google team.

""Policy: All Files Access Permission Files and directory attributes on a user's device are regarded as personal and sensitive user data subject to the Personal and Sensitive Information policy and the following requirements: https://play.google.com/console/u/2/policy-emails/developers/6665275664097267853?id=4979911108359167602 1/3 20/12/2021, 10:00 Play Console Apps should only request access to device storage which is critical for the app to function, and may not request access to device storage on behalf of any third-party for any purpose that is unrelated to critical user-facing app functionality. Android devices running Android "R" (Android 11) or later, will require the MANAGE_EXTERNAL_STORAGE permission in order to manage access in shared storage. All apps that target R or later and request broad access to shared storage ("All files access") must successfully pass an appropriate access review prior to publishing. Apps allowed to use this permission must clearly prompt users to enable "All files access" for their app under "Special app access" settings. For more information on the R requirements, please see this help article. Read more about Use of All Files Access Permission See Android storage use cases and best practices Address this issue in the Play Console.""

4

1 回答 1

0

就像错误所说的那样;Android 制定了特定规则来保护消费者设备免受恶意应用程序的侵害。在受控工作环境中,当您使用 MDM 管理 android 设备时,您可以绕过此权限。然而,对于进入应用商店的应用,谷歌必须假设你对你启用的每一个权限都有恶意。只是为了遮掩他们的后背。

您是否必须将此文件保存到用户个人存储的公共位置?如果您提示权限,您可以改为使用命名空间将文件保存到 App 文件夹System.SpecialFolder

于 2021-12-22T09:45:37.617 回答