Android 使用特定语言的谷歌地图
我想用一种特定的语言打开谷歌地图,如英语、印地语、卡纳达语等。是否可以在谷歌地图的URI中发送区域设置 我用下面的代码打开谷歌地图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
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为谷歌地图应用程序设置语言。