启动从其他应用程序加载谷歌纵横的意图

时间:2012-02-24 14:13:09

标签: android google-maps google-latitude

有人可以通过Android中其他应用程序的意图向我提供如何启动谷歌纵横(仅在其主屏幕上)吗?

2 个答案:

答案 0 :(得分:0)

如果你有一个URI,你可以这样做:

Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri); intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);

startActivity(intent);

答案 1 :(得分:0)

谢谢,我设法这样做......

Intent intent = new Intent();
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.LatitudeActivity");
startActivity(intent);