草庐IT

historical_place

全部标签

android - 使用适用于 Android 的 google places api 网络服务搜索附近的特定地点

我正在尝试使用googleplacesapi网络服务将地点搜索类型限制为医院,但无法实现。逻辑猫java.lang.NullPointerExceptionatcom.ediode.graphics3d.ClinicFragment.sbMethod(ClinicFragment.java:174)atcom.ediode.graphics3d.ClinicFragment.onMapReady(ClinicFragment.java:95)主ActivitypublicclassClinicFragmentextendsAppCompatActivityimplementsGoogl

java - Places.GeoDataApi.getAutocompletePredictions

我在使用AndroidGooglePlacesAPI-自动完成功能时遇到问题。我正在尝试使用Places.GeoDataApi.getAutocompletePredictions()获取placeId的方法,但是,它不起作用。(输出甚至不显示“无法获取值”)谁能帮帮我?这是我的Java代码:PendingResultresult=Places.GeoDataApi.getAutocompletePredictions(mGoogleApiClient,query,mLatLonBounds,null);result.setResultCallback(newResultCallbac

android - Google Places API 自动完成仅获取城市列表

我正在我的Android应用程序上实现谷歌的地点自动完成功能,它可以显示每个相似的地点,但我如何才能仅在用户尝试搜索任何内容时获得城市建议。我搜索了很多,但我找不到类似的Android地方自动完成问题。我已经从谷歌的示例中实现了PlaceAutocompleteAdapter,这看起来像PlaceAutocompleteAdapterpackagecom.tribikram.smartcitytraveler;importandroid.content.Context;importandroid.graphics.Typeface;importandroid.text.style.Ch

android - java.lang.IllegalStateException : Places must be initialized 错误

我使用的是旧的PlaceSDK,它运行良好,但它会被贬值,所以我搬到了新的PlaceSDK。我从一些设备上得到了崩溃报告。崩溃报告:FatalException:java.lang.RuntimeExceptionUnabletostartactivityComponentInfo{com.islamuna.ramadan/com.google.android.libraries.places.widget.AutocompleteActivity}:java.lang.IllegalStateException:Placesmustbeinitialized.SDK版本:implem

android - Material 设计 : Where to place elevation in android styles?

我想在我的某些应用样式中设置项目高度。现在海拔只有21或更高,没有支持库,所以我的自然倾向是创建一个styles-v21xml并将它放在那里:4dp问题是我在常规styles.xml文件中对Widget.MyApp.Drawer所做的任何更改都将被它完全覆盖。我想要的是将提升添加到我为styles.xml中列出的此样式的v21版本所做的样式更改列表的底部。所以我着手创建基本样式,我在View中使用的样式继承自:@drawable/listitem_background@dimen/list_item_height我在styles.xml中将样式留空,在styles-v21中,我添加了高

android - 自动完成 Google Places 示例

我正在尝试运行Google地方代码示例,但无法运行。我收到如下错误消息:ErrorgettingautocompletepredictionAPIcall:Status{statusCode=TIMEOUT,resolution=null}我将我的GoogleMapV2ApiKey添加到list中,并使用正确的证书对应用程序进行了签名,因此看来key可能在此处:mGoogleApiClient=newGoogleApiClient.Builder(this).enableAutoManage(this,0/*clientId*/,this).addConnectionCallbacks

android - Google Places API AutocompleteSupportFragment 空指针异常

我正在使用GooglePlacesAPI获取自动完成支持fragment以获取包含位置建议的搜索栏。我按照这里给出的教程PlacesAutocomplete这是XML代码这是Java代码//InitializetheAutocompleteSupportFragment.AutocompleteSupportFragmentautocompleteFragment=(AutocompleteSupportFragment)getActivity().getSupportFragmentManager().findFragmentById(R.id.autoCompleteFragmen

android - fragment : what is the best place to measure Views?

我有一个fragment,我需要测量它在屏幕上的View的位置/宽度/高度并传递给其他一些类。所以我有一个函数可以做到这一点,就像这样:privatevoidmeasureTest(){v=ourView.findViewById(R.id.someTextField);v.getLocationOnScreen(loc);intw=v.getWidth();...SomeClass.passLocation(loc,w);...问题是View的位置/宽度/高度在fragment生命周期内没有准备好。因此,如果我在这些生命周期方法中运行该函数:onCreateViewonViewCre

android - 如何在 Android 中使用 Google Places API for Web 服务?

https://maps.googleapis.com/maps/api/place/nearbysearch/json?rankby=distance&location=LATITUDE,LONGITUDE&rankBy=50000&types=grocery_or_supermarket&sensor=true&name=NAMESEARCH&key=SERVER_KEY如何使用此链接返回json格式的结果,我已经有一个服务器key,但它一直说“此IP、站点或移动应用程序未被授权使用此APIkey。” 最佳答案 集成Google

Android Google Place Picker 在 Signed APK 中工作但在 Live 应用程序中不工作

我有一个使用了GooglePlacePicker的应用程序。我面临着一个非常奇怪的问题。当我使用我的应用程序的keystore创建已签名的APK时,PlacePicker运行良好。我通过GooglePlayStore上传的同一个APK。当我打开那个PlacePicker时,它自动关闭了。我已经在网上和这里阅读了很多评论。但我无法确定为什么它在已签名的APK中运行良好,而在GooglePlayStore上运行的相同APK却无法运行。当我检查GooglePlayStore的LIVE应用程序日志时,出现如下错误:Volley:[198]BasicNetwork.performRequest: