Skip to content

Commit 0dc9b05

Browse files
authored
📝 Add a tip for ACCESS_MEDIA_LOCATION permission (#154)
1 parent b5ded2a commit 0dc9b05

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

README-ZH.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,18 @@ W/Glide (21133): Failed to find GeneratedAppGlideModule. You should include an
388388

389389
`Glide` 通过注解来保证单例,防止单例或版本之间的冲突,而因为`photo_manager`使用了`Glide`提供部分图片功能,所以使用它的项目必须实现自己的`AppGlideModule`。 请移步[Android](#android)部分了解如何实现。
390390

391+
### 禁用媒体位置权限
392+
393+
Android 将默认包含 `ACCESS_MEDIA_LOCATION` 权限。
394+
这个权限是在 Android Q 中引入的。
395+
如果你的应用不需要这个权限,
396+
你需要在你的应用中的 `AndroidManifest.xml` 中添加以下节点内容:
397+
```xml
398+
<uses-permission
399+
android:name="android.permission.ACCESS_MEDIA_LOCATION"
400+
tools:node="remove"
401+
/>
402+
```
391403

392404
## 致谢
393405

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,20 @@ W/Glide (21133): Failed to find GeneratedAppGlideModule. You should include an
392392

393393
`Glide` needs annotation to keep singleton, prevent conflict between instances and versions, so while the photo manager uses `Glide` to implement image features, the project which import this should define its own `AppGlideModule`. See [Android](#android) section for implementation.
394394

395+
### Disable `ACCESS_MEDIA_LOCATION` permission
396+
397+
Android contains `ACCESS_MEDIA_LOCATION` permission by default.
398+
This permission is introduced in Android Q.
399+
If your app doesn't need the permission,
400+
you need to add the following node to the `AndroidManifest.xml` in your app:
401+
402+
```xml
403+
<uses-permission
404+
android:name="android.permission.ACCESS_MEDIA_LOCATION"
405+
tools:node="remove"
406+
/>
407+
```
408+
395409
## Contributors ✨
396410

397411
Many thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

0 commit comments

Comments
 (0)