我正在设计一个使用map并要求用户输入目的地的应用程序。我在xml中添加了PlaceAutoCompleteFragmentfragmentandroid:id="@+id/place_autocomplete_fragment"android:layout_width="200dp"android:layout_height="wrap_content"android:layout_gravity="top"android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"/>Andth
我已将Googleplaces的gradle从8.4.0更新到10.0.1使用编译'com.google.android.gms:play-services-places:10.0.1'。它给了我这样的预测结果:E/PlaceAutocomplete:ChIJARFGZy6_wjsRQ-Oenb9DjYIE/PlaceAutocomplete:ChIJCZRqkjTBwjsRtSBs09cqv5IE/PlaceAutocomplete:ChIJSXAo8VjAwjsR8XBJRuCZo0cE/PlaceAutocomplete:ChIJfxihRRy35zsRHL6ljyiIYKQE/
我重用了Android团队的GooglePlaceAutocomplete示例项目中的代码。我为每个项目使用了不同的key(还在谷歌控制台中为Android启用了GooglePlaces)。当我构建并运行示例项目时,它运行没有问题。但是,当我从我的应用程序运行它时,有时它可以正常工作,有时我会收到未知的状态代码:9000(来自status.toString())。我在控制台上得到了这个:04-0801:15:39.33116148-10791/?W/Places﹕f.a:633:gLocReplyElementunsuccessfulstatus:104-0801:15:39.3321
我正在创建一个Android应用程序。因为我正在使用PlaceAutocomplete.IntentBuilder从Google获取地址。我想更改PlaceAutocompleteView中搜索框的提示文本。我使用下面的代码打开PlaceAutocompleteView。Intentintent=newPlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY).build(this);startActivityForResult(intent,requestCode);屏幕截图: 最佳答案
我正在使用GooglePlacesAPI。但是如果不实现其余API,我找不到减少请求数量的方法。try{Intentintent=newPlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_FULLSCREEN).setFilter(newAutocompleteFilter.Builder().setTypeFilter(AutocompleteFilter.TYPE_FILTER_ADDRESS).build()).build(mActivity);startActivityForResult(intent,REQUEST_C