mirror of
https://github.com/ev-map/EVMap.git
synced 2026-04-22 23:29:40 -04:00
"start navigation immediately" intent is specific to Google Maps
fallback to normal geo intent if not available
This commit is contained in:
@@ -172,6 +172,7 @@ class MapsActivity : AppCompatActivity(),
|
||||
val coord = charger.coordinates
|
||||
val intent = Intent(Intent.ACTION_VIEW)
|
||||
intent.data = Uri.parse("google.navigation:q=${coord.lat},${coord.lng}")
|
||||
intent.`package` = "com.google.android.apps.maps"
|
||||
if (prefs.navigateUseMaps && intent.resolveActivity(packageManager) != null) {
|
||||
startActivity(intent);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user