问题
try {
Intent searchAddress = new Intent(Intent.ACTION_VIEW,
Uri.parse("geo:0,0?="+emp_city_location));
startActivity(searchAddress);
} catch(Exception e) {
System.out.println(e);
}
i got the exception like
03-03 21:01:56.349: INFO/System.out(179): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo:0,0?=chennai }
please do reply me
回答1:
You need to construct your geo:
URL properly. See the documentation for the syntax. I think you may only be missing a q
between the ?
and the =
, but I have not tried that particular geo:
syntax.
回答2:
Make sure that you are using the Google API emulator image for your testing. Bring up the AVD and set the emulator to be a Google API emulator. If you don't do this, then you will continue to get the bug. Also, the previous poster was right... you need to following the URI standards found here: http://developer.android.com/intl/de/guide/appendix/g-app-intents.html
Regards, Chris
回答3:
Have declared Activity in manifest file also check have you added Google map library in manifest file
回答4:
Try something like this :
geo:0,0?q=chennai
来源:https://stackoverflow.com/questions/2372557/how-to-call-the-google-map-from-my-android-application-like-invoke-the-email