From adac63145bb2936023fd76e73d49e3ab24657c57 Mon Sep 17 00:00:00 2001 From: MrCsabaToth Date: Wed, 9 Nov 2022 20:42:10 -0800 Subject: [PATCH] Adding coarse location to the permission request for Android 10+ #2 --- .../recyclingtrashcans/helpers/GeoPermissionsHelper.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/dev/csaba/armap/recyclingtrashcans/helpers/GeoPermissionsHelper.kt b/app/src/main/java/dev/csaba/armap/recyclingtrashcans/helpers/GeoPermissionsHelper.kt index 03a1c1b..1ff417a 100644 --- a/app/src/main/java/dev/csaba/armap/recyclingtrashcans/helpers/GeoPermissionsHelper.kt +++ b/app/src/main/java/dev/csaba/armap/recyclingtrashcans/helpers/GeoPermissionsHelper.kt @@ -26,7 +26,11 @@ import androidx.core.content.ContextCompat /** Helper to ask camera permission. */ object GeoPermissionsHelper { - private val PERMISSIONS = arrayOf(Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION) + private val PERMISSIONS = arrayOf( + Manifest.permission.CAMERA, + Manifest.permission.ACCESS_COARSE_LOCATION, + Manifest.permission.ACCESS_FINE_LOCATION + ) /** Check to see we have the necessary permissions for this app. */ fun hasGeoPermissions(activity: Activity): Boolean {