I have a simple method in my main activity.
private void showMap(String name ) { String thePlace = name.replaceAll(" ", "+"); Intent intent= new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=" + thePlace+ "" )); startActivity(intent); }
And in my manifest
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.INTERNET" />
But when I run the application in the emulator, it crashed and, according to the log, says
No activity found to handle the intent
Is there something I'm doing wrong?
source share