Android 无浏览器谷歌地图应用程序意图

Android 无浏览器谷歌地图应用程序意图,android,google-maps,Android,Google Maps,我想在单击链接时打开本机Google地图应用程序,所以我这样做了: String urlAddress = "http://maps.google.com/maps?q="+ mylat +"," + mylon +"("+ markertitle + ")&iwloc=A&hl=en"; Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(urlAddress)); startActivity(intent); 但

我想在单击链接时打开本机Google地图应用程序,所以我这样做了:

String urlAddress = "http://maps.google.com/maps?q="+ mylat +"," + mylon +"("+ markertitle + ")&iwloc=A&hl=en";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(urlAddress));
startActivity(intent);
但这只是在本机浏览器中打开url。如何强制它打开“地图”应用程序?

尝试:

String urlAddress = "http://maps.google.com/maps?q="+ mylat +"," + mylon +"("+ markertitle + ")&iwloc=A&hl=en";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(urlAddress));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
试试这个

String urlAddress = "http://maps.google.com/maps?q="+ mylat +"," + mylon +"("+ markertitle + ")&iwloc=A&hl=en";
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, 
Uri.parse(urlAddress));
startActivity(intent);

我应该在舱单上申报吗?怎么做?因为它给了我这个错误:
09-03 22:35:30.062:E/AndroidRuntime(4140):android.content.ActivityNotFoundException:找不到显式活动类{com.google.android.apps.maps/com.google.android.maps.MapsActivity};您是否在AndroidManifest.xml中声明了此活动?
这意味着设备没有安装google地图应用程序,您可以捕获ActivityNotFoundException以避免崩溃。您确定您的设备安装了google地图吗@用户3673449就是这样,我认为这是理所当然的。谢谢