diff --git a/README.md b/README.md index 7f0d707b..e651dc46 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,7 @@ Add all wanted permissions to your app `android/app/src/main/AndroidManifest.xml + @@ -444,6 +445,7 @@ PERMISSIONS.ANDROID.ACCEPT_HANDOVER; PERMISSIONS.ANDROID.ACCESS_BACKGROUND_LOCATION; PERMISSIONS.ANDROID.ACCESS_COARSE_LOCATION; PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION; +PERMISSIONS.ANDROID.ACCESS_MEDIA_LOCATION; PERMISSIONS.ANDROID.ACTIVITY_RECOGNITION; PERMISSIONS.ANDROID.ADD_VOICEMAIL; PERMISSIONS.ANDROID.ANSWER_PHONE_CALLS; diff --git a/android/src/main/java/com/zoontek/rnpermissions/RNPermissionsModule.java b/android/src/main/java/com/zoontek/rnpermissions/RNPermissionsModule.java index e0691a24..a8532ab5 100644 --- a/android/src/main/java/com/zoontek/rnpermissions/RNPermissionsModule.java +++ b/android/src/main/java/com/zoontek/rnpermissions/RNPermissionsModule.java @@ -77,6 +77,8 @@ public Request(boolean[] rationaleStatuses, Callback callback) { return "ACCESS_COARSE_LOCATION"; if (permission.equals("android.permission.ACCESS_FINE_LOCATION")) return "ACCESS_FINE_LOCATION"; + if (permission.equals("android.permission.ACCESS_MEDIA_LOCATION")) + return "ACCESS_MEDIA_LOCATION"; if (permission.equals("com.android.voicemail.permission.ADD_VOICEMAIL")) return "ADD_VOICEMAIL"; if (permission.equals("android.permission.ACTIVITY_RECOGNITION")) diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 894e7b96..1effb7a9 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -7,6 +7,7 @@ + diff --git a/src/permissions.android.ts b/src/permissions.android.ts index 4c420781..103e591f 100644 --- a/src/permissions.android.ts +++ b/src/permissions.android.ts @@ -6,6 +6,7 @@ const ANDROID = Object.freeze({ ACCESS_BACKGROUND_LOCATION: 'android.permission.ACCESS_BACKGROUND_LOCATION', ACCESS_COARSE_LOCATION: 'android.permission.ACCESS_COARSE_LOCATION', ACCESS_FINE_LOCATION: 'android.permission.ACCESS_FINE_LOCATION', + ACCESS_MEDIA_LOCATION: 'android.permission.ACCESS_MEDIA_LOCATION', ACTIVITY_RECOGNITION: 'android.permission.ACTIVITY_RECOGNITION', ADD_VOICEMAIL: 'com.android.voicemail.permission.ADD_VOICEMAIL', ANSWER_PHONE_CALLS: 'android.permission.ANSWER_PHONE_CALLS',