From e37f42a93cf40012a6853aad30da371cb1871e66 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 18 Apr 2020 11:38:19 +0200 Subject: [PATCH] move location showing on map into Commons --- app/build.gradle | 2 +- .../gallery/pro/extensions/Activity.kt | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c22367b63..da738680a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -78,7 +78,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.25.24' + implementation 'com.simplemobiletools:commons:5.25.25' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt index fd7f24862..a7fd3d716 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt @@ -648,17 +648,7 @@ fun Activity.showFileOnMap(path: String) { val latLon = FloatArray(2) if (exif.getLatLong(latLon)) { - val uriBegin = "geo:${latLon[0]},${latLon[1]}" - val query = "${latLon[0]}, ${latLon[1]}" - val encodedQuery = Uri.encode(query) - val uriString = "$uriBegin?q=$encodedQuery&z=16" - val intent = Intent(Intent.ACTION_VIEW, Uri.parse(uriString)) - val packageManager = packageManager - if (intent.resolveActivity(packageManager) != null) { - startActivity(intent) - } else { - toast(R.string.no_app_found) - } + showLocationOnMap("${latLon[0]}, ${latLon[1]}") } else { toast(R.string.unknown_location) }