我正在尝试在我的Android 10 (API 29)设备上获取MANAGE_EXTERNAL_STORAGE权限。
https://developer.android.com/training/data-storage/manage-all-files
清单文件:
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
主活动:
Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION);
startActivity(intent);
结果是:
No Activity found to handle Intent { act=android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION }
好的,这种行为是可能的。文档上说:
In some cases, a matching Activity may not exist, so ensure you safeguard against this.
但是我该如何获得那个许可呢?