如何在com.google.android.libraries.places:places中设置语言限制:

Android调试器

我正在设置此新的Google Places API-> com.google.android.libraries.places:places:1.1.0,但找不到该API提供的结果所用的语言。

当我输入一些关键字时,仅在少数关键字中显示本地语言“印地语”(印度语言)的结果,但这样做通常会显示正常的英语结果。

以下是在印地语上显示结果的关键字:-

关键字:“ Rohini Sector 11”

产出:244,印度德里罗希尼,11区,G3S电影厅后面,110085,印度德里

  FindAutocompletePredictionsRequest.
    FindAutocompletePredictionsRequest request = 
  FindAutocompletePredictionsRequest.builder()
            // Call either setLocationBias() OR setLocationRestriction().
            //.setLocationBias(bounds)
            .setCountry("IN")
            .setTypeFilter(TypeFilter.REGIONS)
            .setSessionToken(token)
            .setQuery(constraint.toString())
            .build();

    Task<FindAutocompletePredictionsResponse> autocompletePredictions = placesClient.findAutocompletePredictions(request);

我期望这个api的输出像:

关键字:“ Rohini Sector 11”

产出:244,印度德里罗希尼,11区,G3S电影厅后面,110085,印度德里

埃文

目前看来这不可能,但是Google的问题跟踪器中对此功能有一些要求,建议您加星号以增加可见性并订阅以后的通知:

https://issuetracker.google.com/issues/35830937
https://issuetracker.google.com/issues/63829150

希望这可以帮助!

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Google的新地方信息库(实现“ com.google.android.libraries.places:1.0.0”)无法解析

在 android 中集成 google 位置 sdk 时出错,“错误:键入 com.google.android.libraries.places.internal.nx”

错误 com.android.dex.DexException:多个 dex 文件定义了 Lcom/google/android/libraries/places/internal/dh;

无法启动活动ComponentInfo {com.app.test,myapp / com.google.android.libraries.places.widget.AutocompleteActivity}

如何在Android中为Google Place Details设置语言?

从 Android 中的 Google Places 加载图片

如何在Google Places API中针对Android中的自动完成预测获取特定国家/地区的结果?

如何在我的android应用中的搜索小部件上实现Google Places自动完成功能?

如何从kataklisma / android-google-places库中获取经度和纬度值

复制类com.google.android.gms.location.places.zza

如何在iOS Swift中从Google Places API获取坐标

如何在com.google.android.material.chip.Chip上设置chipText?

如何在Android Studio中修复“无法解决:com.google.gson:gson:2.8.5”

Google Places Autocomplete插件在Firefox Android中不起作用

如何将Google Places中的地点与我在Android应用程序中自己的地点合并

如何在Android上的GoogleMap中修复com.google.android.gms.maps.model.Marker com.google.android.gms.maps.GoogleMap.addMarker

如何在Android中设置EditText的限制?

如何从Android / Java中的Google Places API获取有关某个地点的确切子类别名称?

如何在Android Studio中设置Google Maps Utility Api?

在模块中找到Android Duplicate类com.google.android.gms.location.places.zza

Android Studio无法解析导入com.google.android.gms.location.places.Place;

Android Studio无法解析com.google.android.gms.location.places.AutocompleteFilter

如何在Android上的G +中修复boolean com.google.android.gms.common.ConnectionResult.hasResolution()空引用

Clojurescript-无法在Google Places Autocomplete API中限制城市

Android PlaceFilter与Google Places API的配合使用

Android google Places API 超出每日配额

Google Places API Android resultCallback无法启动

Android解析Google Places API JSON

如何验证Google Places AutoCompleteTextView