It is possible to create a KML file in Google Earth on a PC. Then put this file on the SD card and you can call this KML file into this activity. But a prerequisite for work is that the device requires Google Earth.
public void buttonClicked(View view) {Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); File file = new File("/sdcard/APK/trek1.kml"); intent.setDataAndType(Uri.fromFile(file), "application/vnd.google-earth.kml+xml"); startActivity(intent); }
Perhaps you know that.
source share