应用更新不断被 PlayStore 拒绝 MANAGE_EXTERNAL_STORAGE 权限,应用描述也没有更新

App update constantly rejected by PlayStore for MANAGE_EXTERNAL_STORAGE permission and app description is also not updating

我的应用程序帮助用户管理 whatsapp 贴纸 link to app 并且它在第一个版本中支持 SDK30 但在该版本之后现在当我尝试更新新版本的应用程序时 playstore 向我发送应用程序状态被拒绝,我尝试了多个次,我在应用程序描述中甚至在请求许可时在应用程序中提到了许可的原因,但我的应用程序没有更新,我的应用程序的简短和详细描述也没有更新。 我也填写了敏感许可表,每当我尝试发布新版本时 google 发给我

Publishing Status App Status: Rejected

Your app has been rejected and wasn't published due to a policy violation. If you submitted an update, the previous version of your app is still available on Google Play.

Issue: Access to device storage not required

The feature you identified does not require unrestricted access to device storage. There are other privacy friendly options for accessing files in shared storage, such as using the system file picker, or, depending on the use case, you can follow the recommendations for receiving data from other apps listed here.

Please update your app so that the feature uses a privacy friendly alternative and remove All Files Access (MANAGE_EXTERNAL_STORAGE) permission.

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:

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 and how to open files using storage access framework Address this issue in the Play Console. Issue: Not a core feature

The feature you identified that is dependent on this permission does not appear to be critical to the core functionality of your app.

Core functionality is defined as the main purpose of the app. Without this core functionality, the app is "broken" or rendered unusable. The core functionality, as well as any core features that comprise this core functionality, must all be prominently documented and promoted in the app's description.

Please update your app so that the feature does not use this permission or ensure that the core functionality is prominently documented and promoted in the app's description and resubmit your app on Play Developer console.

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:

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.
Issue: Need to use Media Store API

You have requested access to All Files Access permission but it appears that your app's core feature requires access to only Media Files. With the MediaStore API, apps can contribute and access media that's available on an external storage volume without the need for the access all files permission.

Please update your app so that the feature uses Media Store APIs and remove All Files Access (MANAGE_EXTERNAL_STORAGE) permission.

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:

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 and how to access media files from shared storage Address this issue in the Play Console.

经过大量的努力和研究,我决定将目标 SDK 版本降低到 29 并 post 我的应用程序更新,我能够 post 更新,令人惊讶的是它也更新了 sdk 30 ,如果您遇到同样的问题,只需将目标 sdk 更改为 29 并将编译 sdk 保持为 30,试试看,它对我有用,也许对您也有用。也许这是 google 系统中的一个漏洞,但它对我有用。

我一个月都遇到同样的错误,但最后,Google Play 商店接受了我的上传。

简而言之,我所做的是为每条轨道创建新版本,而且 - 有趣的是 - 它奏效了!

(在我无数次更新试验之前,我们最新的生产版本是 2.23.5(构建 1),我们的活动轨道是内部测试轨道和生产,我试图将我的更新上传到内部测试轨道。)

以下是我应用的步骤:

  1. 创建了一个包含所有必要更改的新版本 2.24.1(版本 1)。 (例如升级targetSdkVersion到30,移除MANAGE_EXTERNAL_STORAGE权限等)
  2. 激活我们的非活动轨道(Open、Closed Alpha 和 Beta 测试轨道),将相同的构建 2.24.1(构建 1)上传到这些轨道,然后暂停这些轨道。 (我暂停了它们,因为我不会主动使用它们,你可能不想暂停)
  3. 创建了另一个版本 2.24.1(版本 2),它与版本 1 完全相同。我刚刚更新了它的版本号。
  4. 已将 2.24.1(build 2)上传到内部测试轨道。
  5. 创建了另一个版本 2.24.1(版本 3),它与版本 3 完全相同。我刚刚更新了它的版本号。
  6. 已将 2.24.1(内部版本 3)上传到正式版。
  7. 转到“发布概述”页面,激活托管发布,以便在我的上传被接受后手动将我的上传发布到生产和其他轨道。
  8. 立即发送这些上传以供审核,瞧,Google 接受您的上传!

目前Play商店只接受编译sdk版本和目标sdk版本大于等于30的应用。 因此,将目标 sdk 版本降低到 29 是行不通的,因为您无法在 Play 商店上传该应用程序。 现在根据 Play 商店政策 Google Play 限制使用高风险或敏感权限,包括称为“所有文件访问权限”的特殊应用访问权限。这仅适用于针对 Android 11(API 级别 30)并声明 MANAGE_EXTERNAL_STORAGE 权限的应用程序,该权限是在 Android 11 中添加的。此外,此策略不适用影响 READ_EXTERNAL_STORAGE 权限的使用。

长话短说您的应用必须符合所有政策才能获得批准。 当您的应用程序无法有效地利用对隐私更友好的最佳实践时,您应该只访问所有文件访问权限,例如使用 Storage Access Framework or the Media Store API.

从清单文件中删除外部存储权限。 尝试在需要访问文件的地方应用它:

替换

Environment.getExternalStoragePublicDirectory()

Context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS)

因为根据 google 策略应用程序可以读取和写入应用程序 pecific files and folders.

别忘了加上

android:requestLegacyExternalStorage="true"

在 29 以上的目标 sdk 版本的清单应用程序标记中。

还可以使用内容提供程序访问应用特定文件夹中的文件。 如果不知道怎么操作可以参考this.

昨天我遇到了同样的问题:

  • 目标 sdk (29) 降级对我不起作用。

  • 我刚刚在我的清单中注释掉了“MANAGE_EXTERNAL_STORAGE”权限,更新了版本代码,制作了新的发布版本,最后上传到游戏控制台没有任何问题。

    <uses-permission  android:name="android.permission.MANAGE_EXTERNAL_STORAGE"  />
    

使用 MANAGE_EXTERNAL_STORAGE 不是一个好主意,除非您的应用是文件管理器、防病毒或清洁应用。但是,在您的情况下,您只需要访问特定文件夹,即 /sdcard/emulated/0/WhatsApp。我们仍然有一个解决方法,可以通过 Storage Access Framework 文件夹选择器授予此文件夹的完全访问权限。

您可以通过 Intent.ACTION_OPEN_DOCUMENT_TREE 强制用户访问 select WhatsApp 文件夹,然后使用 ContentResolver#takePersistableUriPermission() 保存权限状态。但是编写自己的代码来处理这个可能需要付出很多努力。

我建议你使用SimpleStorage。因为更简单:

class MainActivity : AppCompatActivity() {

    private val storageHelper = SimpleStorageHelper(this)

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        storageHelper.onStorageAccessGranted = { _, root ->
            Toast.makeText(
                this,
                "Folder ${root.getAbsolutePath(this)} is accessible now.",
                Toast.LENGTH_SHORT
            ).show()
        }

        btnRequestStorageAccess.setOnClickListener {
            // Force the user to select directory /sdcard/emulated/0/WhatsApp
            // The access will be granted once the user selected this folder,
            // and then you can explore this directory.
            storageHelper.requestStorageAccess(
                requestCode = REQUEST_CODE_STORAGE_ACCESS,
                initialRootPath = StorageType.EXTERNAL,
                expectedStorageType = StorageType.EXTERNAL,
                expectedBasePath = "WhatsApp"
            )
        }
    }

    override fun onSaveInstanceState(outState: Bundle) {
        storageHelper.onSaveInstanceState(outState)
        super.onSaveInstanceState(outState)
    }

    override fun onRestoreInstanceState(savedInstanceState: Bundle) {
        super.onRestoreInstanceState(savedInstanceState)
        storageHelper.onRestoreInstanceState(savedInstanceState)
    }
}

这个答案可能不符合您的期望,但您可以试试这个替代方案。

应用程序应满足所有政策才能获得 Google Play 控制台的批准

<uses-permission  android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>

当您的应用无法有效地利用对隐私更友好的最佳实践(例如使用存储访问框架或媒体商店)时的所有文件访问权限API。

替换

Environment.getExternalStoragePublicDirectory()

Context.getExternalFilesDir("filename");