Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/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
Android 使用特定语言的谷歌地图_Android_Google Maps_Android Intent - Fatal编程技术网

Android 使用特定语言的谷歌地图

Android 使用特定语言的谷歌地图,android,google-maps,android-intent,Android,Google Maps,Android Intent,我想用一种特定的语言打开谷歌地图,如英语、印地语、卡纳达语等。是否可以在谷歌地图的URI中发送区域设置 我用下面的代码打开谷歌地图 val muri = "google.navigation:q=" + pickupLatitude + "," + pickupLongitude + "&mode=l" val intent = Intent(Intent.ACTION_VIEW, Uri.parse(muri)) intent

我想用一种特定的语言打开谷歌地图,如英语、印地语、卡纳达语等。是否可以在谷歌地图的URI中发送区域设置

我用下面的代码打开谷歌地图

val muri = "google.navigation:q=" + pickupLatitude + "," + pickupLongitude + "&mode=l"
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(muri))
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
startActivity(intent)
遵循以下解决方案,但不起作用

String uri = String.format(Locale.ENGLISH, "http://maps.google.com/maps? 
saddr=%f,%f(%s)&daddr=%f,%f (%s)", sourceLatitude, sourceLongitude, "Home Sweet Home", 
destinationLatitude, destinationLongitude, "Where the party is at");
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
intent.setPackage("com.google.android.apps.maps");
startActivity(intent);

似乎没有办法通过Intent为谷歌地图应用程序设置语言。