Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 我想在android中将latlng值从一个活动传递到另一个活动_Java_Android - Fatal编程技术网

Java 我想在android中将latlng值从一个活动传递到另一个活动

Java 我想在android中将latlng值从一个活动传递到另一个活动,java,android,Java,Android,我在第一个活动中列出了一些餐厅,我想在谷歌地图上看到我每次选择的每个餐厅的具体位置。如何将这些值从第一个活动传递到“地图”活动 您所需要做的就是(从中):- 提示:是可包裹的。 // Create a Uri from an intent string. Use the result to create an Intent. Uri gmmIntentUri = Uri.parse("google.streetview:cbll=46.414382,10.013988"); // Create

我在第一个活动中列出了一些餐厅,我想在谷歌地图上看到我每次选择的每个餐厅的具体位置。如何将这些值从第一个活动传递到“地图”活动

您所需要做的就是(从中):-

提示:
是可包裹的
// Create a Uri from an intent string. Use the result to create an Intent.
Uri gmmIntentUri = Uri.parse("google.streetview:cbll=46.414382,10.013988");

// Create an Intent from gmmIntentUri. Set the action to ACTION_VIEW
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
// Make the Intent explicit by setting the Google Maps package
mapIntent.setPackage("com.google.android.apps.maps");

// Attempt to start an activity that can handle the Intent
startActivity(mapIntent);