I need to open google maps using kml file wich already exists on sdcard. (/sdcard/example.kml)
I tried:
this answer is wrong, when click on link, maps open, but search for location "file:///sdcard/example.kml"
- Using Intent:
This code throws ActivityNotFoundException
:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("file:///sdcard/example.kml"));
startActivity(intent);
- I tried use setDataAndType method, but isnt works:
Another ActivityNotFoundException
:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(
Uri.parse("file:///sdcard/example.kml"),
"application/kml");
startActivity(intent);
- Other two unsolved topics about this issue:
Open local KML File in Google Maps on Android
Does the Android API support KML files?
Any idea how to open this kml?
Thank you!!!