Is there a way to open a local KML/KMZ file in Google Maps/Earth app on Android? Tried the below approach but didn't work.
Intent mapIntent = new Intent(Intent.ACTION_VIEW);
Uri uri1 = Uri
.parse("geo:0,0?q=file:///mnt/sdcard/doc.kml");
mapIntent.setData(uri1);
startActivity(Intent.createChooser(mapIntent, "Sample"));
If not and if we can specify only links that are hosted on the web then can we specify a link to the Google Drive file to show directly on Google Maps/Earth?
Intent mapIntent = new Intent(Intent.ACTION_VIEW);
Uri uri1 = Uri
.parse("geo:0,0?q=https://drive.google.com/open?id=0B8n3LAJCTg-8eml4TTBoZDlRd00&authuser=0");
mapIntent.setData(uri1);
startActivity(Intent.createChooser(mapIntent, "Sample"));
And finally what happened to the play tour functionality in Google Earth? It used to work but with the latest updates its broken and no longer working.
File file = new File(playFileNameKml);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file),
"application/vnd.google-earth.kml+xml");
intent.putExtra("com.google.earth.EXTRA.tour_feature_id", "tour");
startActivity(intent);
As I know, in Maps its impossible since the URI must be online address that google servers can access. Regarding Earth, that was working for me: