如何从我当前的应用程序打开**Google Maps**应用程序?

Meh*_*oki 1 android google-maps

如何在当前应用程序的按钮点击事件中打开Google地图应用程序.

San*_*ela 5

使用下面的线

String uri = "http://maps.google.com/";
            Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
            intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
            startActivity(intent);
Run Code Online (Sandbox Code Playgroud)

将在地图应用程序中重定向.