mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
make sure there is an application with maps before sending the intent
This commit is contained in:
parent
5bba8d27dc
commit
2c4bbfb0e2
12 changed files with 17 additions and 1 deletions
|
@ -175,7 +175,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
val encodedQuery = Uri.encode(query)
|
val encodedQuery = Uri.encode(query)
|
||||||
val uriString = "$uriBegin?q=$encodedQuery&z=16"
|
val uriString = "$uriBegin?q=$encodedQuery&z=16"
|
||||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(uriString))
|
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(uriString))
|
||||||
startActivity(intent)
|
val packageManager = packageManager
|
||||||
|
if (intent.resolveActivity(packageManager) != null) {
|
||||||
|
startActivity(intent)
|
||||||
|
} else {
|
||||||
|
toast(R.string.no_map_application)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">andere Ordner</string>
|
<string name="other_folder">andere Ordner</string>
|
||||||
<string name="show_on_map">Show on map</string>
|
<string name="show_on_map">Show on map</string>
|
||||||
<string name="unknown_location">Unknown location</string>
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Größe ändern</string>
|
<string name="resize">Größe ändern</string>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">Other folder</string>
|
<string name="other_folder">Other folder</string>
|
||||||
<string name="show_on_map">Show on map</string>
|
<string name="show_on_map">Show on map</string>
|
||||||
<string name="unknown_location">Unknown location</string>
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Resize</string>
|
<string name="resize">Resize</string>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">Autre dossier</string>
|
<string name="other_folder">Autre dossier</string>
|
||||||
<string name="show_on_map">Show on map</string>
|
<string name="show_on_map">Show on map</string>
|
||||||
<string name="unknown_location">Unknown location</string>
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Redimensionner</string>
|
<string name="resize">Redimensionner</string>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">Other folder</string>
|
<string name="other_folder">Other folder</string>
|
||||||
<string name="show_on_map">Show on map</string>
|
<string name="show_on_map">Show on map</string>
|
||||||
<string name="unknown_location">Unknown location</string>
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Resize</string>
|
<string name="resize">Resize</string>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">Other folder</string>
|
<string name="other_folder">Other folder</string>
|
||||||
<string name="show_on_map">Show on map</string>
|
<string name="show_on_map">Show on map</string>
|
||||||
<string name="unknown_location">Unknown location</string>
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Resize</string>
|
<string name="resize">Resize</string>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">Outra pasta</string>
|
<string name="other_folder">Outra pasta</string>
|
||||||
<string name="show_on_map">Mostrar no mapa</string>
|
<string name="show_on_map">Mostrar no mapa</string>
|
||||||
<string name="unknown_location">Localização desconhecida</string>
|
<string name="unknown_location">Localização desconhecida</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Redimensionar</string>
|
<string name="resize">Redimensionar</string>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">Другая папка</string>
|
<string name="other_folder">Другая папка</string>
|
||||||
<string name="show_on_map">Show on map</string>
|
<string name="show_on_map">Show on map</string>
|
||||||
<string name="unknown_location">Unknown location</string>
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Изменить размер</string>
|
<string name="resize">Изменить размер</string>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">Andra mappar</string>
|
<string name="other_folder">Andra mappar</string>
|
||||||
<string name="show_on_map">Show on map</string>
|
<string name="show_on_map">Show on map</string>
|
||||||
<string name="unknown_location">Unknown location</string>
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Ändra storlek</string>
|
<string name="resize">Ändra storlek</string>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">其他文件夹</string>
|
<string name="other_folder">其他文件夹</string>
|
||||||
<string name="show_on_map">Show on map</string>
|
<string name="show_on_map">Show on map</string>
|
||||||
<string name="unknown_location">Unknown location</string>
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">缩放</string>
|
<string name="resize">缩放</string>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">其他資料夾</string>
|
<string name="other_folder">其他資料夾</string>
|
||||||
<string name="show_on_map">Show on map</string>
|
<string name="show_on_map">Show on map</string>
|
||||||
<string name="unknown_location">Unknown location</string>
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">縮放</string>
|
<string name="resize">縮放</string>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<string name="other_folder">Other folder</string>
|
<string name="other_folder">Other folder</string>
|
||||||
<string name="show_on_map">Show on map</string>
|
<string name="show_on_map">Show on map</string>
|
||||||
<string name="unknown_location">Unknown location</string>
|
<string name="unknown_location">Unknown location</string>
|
||||||
|
<string name="no_map_application">No application with maps has been found</string>
|
||||||
|
|
||||||
<!-- Resizing -->
|
<!-- Resizing -->
|
||||||
<string name="resize">Resize</string>
|
<string name="resize">Resize</string>
|
||||||
|
|
Loading…
Reference in a new issue