Giter VIP home page Giter VIP logo

android-play-places's Introduction

Google Places API for Android Samples

This repository is for the deprecated Google Play Services version of the Places SDK, which has now been replaced by a new static version of the Google Places SDK for Android, and is therefore no longer applicable.

Please refer to the new demos repoistory.

android-play-places's People

Contributors

jfschmakeit avatar nikson avatar pflingstring avatar stephenmcd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-play-places's Issues

Unable to instantiate activity ComponentInfo MainActivity

Attempting to run the program results in the following error:
com.example.google.playservices.placepicker E/AndroidRuntime: Process: com.example.google.playservices.placepicker, PID: 9635

com.example.google.playservices.placepicker E/AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity

ComponentInfo{com.example.google.playservices.placepicker/com.example.google.playservices.placepicker.MainActivity}: java.lang.ClassNotFoundException:

Didn't find class "com.example.google.playservices.placepicker.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.google.playservices.placepicker-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

Device Used is running 5.1.1 API 22 - Xperia SP

Autocomplete error

I keep seeing the stacktrace:
"PlaceAutocompleteAdapter﹕ Error getting autocomplete prediction API call: Status{statusCode=NETWORK_ERROR, resolution=null}"

What's going on?

NETWORK_ERROR when set Filters

Collection<Integer> filterTypes = new ArrayList<Integer>();
filterTypes.add(Place.TYPE_LOCALITY);
filterTypes.add(Place.TYPE_GEOCODE);
filterTypes.add(Place.TYPE_POLITICAL);
AutocompleteFilter filter = AutocompleteFilter.create(filterTypes);

AutocompleteFilter filter2 = AutocompleteFilter.create(PlaceTypes.ALL);

result = Places.GeoDataApi.getAutocompletePredictions(mGoogleApiClient, constraint.toString(),
                        mBounds, filter);
AutocompletePredictionBuffer buffer = result.await(10, TimeUnit.SECONDS);

I'm trying to set filters to get only places of type "(cities)" but any time I try to set a filter I got NETWORK_ERROR on the buffer.getStatus()

This is weird because no matter if I send a filter with all the possible types of places with: AutocompleteFilter.create(PlaceTypes.ALL); I got this NETWORK_ERROR...

It only works when I pass the parameter as null directly or: AutocompleteFilter filter = null;

Are you sure filters are working? because there's a lack of documentation and in the examples always they filters are null.

Thanks

PlacePicker not working On MIUI v.7.02 Unable to start activity ComponentInfo{com.google.android.gms/com.google.android.location.places.ui.placepicker.v1.PlacePickerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Configuration android.content.res.Resources.getConfiguration()'

5-18 22:49:08.944 1610-1610/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.android.gms.ui, PID: 1610
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.gms/com.google.android.location.places.ui.placepicker.v1.PlacePickerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Configuration android.content.res.Resources.getConfiguration()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2330)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
at android.app.ActivityThread.access$800(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5273)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Configuration android.content.res.Resources.getConfiguration()' on a null object reference
at android.view.SurfaceView.init(SurfaceView.java:231)
at android.view.SurfaceView.(SurfaceView.java:193)
at maps.X.x.(Unknown Source)
at maps.X.v.(Unknown Source)
at maps.E.u.(Unknown Source)
at maps.E.u.a(Unknown Source)
at maps.ag.ad.a(Unknown Source)
at maps.ag.t.a(Unknown Source)
at maps.ag.Q.a(Unknown Source)
at vn.onTransact(:com.google.android.gms.DynamiteModulesB:66)
at android.os.Binder.transact(Binder.java:380)
at rdt.a(SourceFile:205)
at rbh.a(SourceFile:96)
at mvn.b(SourceFile:209)
at mvm.a(SourceFile:99)
at rbj.a(SourceFile:1257)
at mvl.a(SourceFile:161)
at com.google.android.gms.maps.MapView.a(SourceFile:5201)
at afjm.onActivityCreated(SourceFile:253)
at com.google.android.chimera.FragmentProxy.onActivityCreated(SourceFile:407)
at android.support.v4.app.Fragment.performActivityCreated(SourceFile:1970)
at ex.a(SourceFile:1092)
at ex.a(SourceFile:1248)
at dy.run(SourceFile:738)
at ex.i(SourceFile:1613)
at es.c(SourceFile:330)
at en.onStart(SourceFile:547)
at com.google.android.chimera.container.ActivityProxy.superOnStart(SourceFile:2398)
at com.google.android.chimera.Activity.onStart(SourceFile:402)
at com.google.android.places.ui.placepicker.v1.PlacePickerChimeraActivity.onStart(SourceFile:240)
at com.google.android.chimera.Activity.publicOnStart(SourceFile:407)
at com.google.android.chimera.container.ActivityProxy.onStart(SourceFile:286)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1239)
at android.app.Activity.performStart(Activity.java:6057)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2293)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392) 
at android.app.ActivityThread.access$800(ActivityThread.java:154) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5273) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) 

placePicker NullPointerException

this is log:
FATAL EXCEPTION: main
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.gms/com.google.android.location.places.ui.placepicker.v1.PlacePickerActivity}: java.lang.NullPointerException
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.ActivityThread.access$600(ActivityThread.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:525)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: Caused by: java.lang.NullPointerException
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.maps.api.android.lib6.gmm6.m.ad.a(Unknown Source)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.maps.api.android.lib6.gmm6.c.h.a(Unknown Source)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.maps.api.android.lib6.gmm6.c.y.a(Unknown Source)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.maps.api.android.lib6.e.bd.a(Unknown Source)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.maps.api.android.lib6.e.ev.a(Unknown Source)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.maps.api.android.lib6.e.af.a(Unknown Source)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.gms.maps.internal.w.onTransact(SourceFile:66)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.os.Binder.transact(Binder.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.gms.maps.internal.aw.a(SourceFile:205)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.gms.maps.m.a(SourceFile:96)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.gms.c.c.b(SourceFile:210)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.gms.c.b.a(SourceFile:100)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.gms.maps.o.b(SourceFile:257)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.gms.maps.o.a(SourceFile:240)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.gms.c.a.a(SourceFile:162)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.gms.maps.MapView.a(SourceFile:382)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.location.places.ui.MarkerMapFragment.onActivityCreated(SourceFile:239)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.support.v4.app.Fragment.performActivityCreated(SourceFile:1970)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.support.v4.app.ag.a(SourceFile:1051)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.support.v4.app.ag.a(SourceFile:1207)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.support.v4.app.ag.c(SourceFile:1189)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.support.v4.app.ag.m(SourceFile:2001)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.support.v4.app.w.onStart(SourceFile:507)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.google.android.location.places.ui.placepicker.v1.PlacePickerActivity.onStart(SourceFile:235)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.Activity.performStart(Activity.java)
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.ActivityThread.access$600(ActivityThread.java)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:525)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)?
01-15 09:09:29.345 17207-17207/? E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)?

Placepicker does not launch when the internet is on

When I click on 'Pick a place' button the activity appears for a second and goes back (when the internet connection is on), whereas if the internet connection is switched off, it works fine.
Is it a problem with my API key?

Please help

Is it possible to get place details using Google Places Api?

I'm not sure if it is an issue, but I would appreciate some help. :)

I want to get details of places (cityName, ZipCode, etc) from predictions that I get from Autocomplete Places service. My code is like the following:

Places.GeoDataApi.getAutocompletePredictions(googleApiClient, query, bounds, null)
            .setResultCallback(
                    new ResultCallback<AutocompletePredictionBuffer>() {
                        @Override
                        public void onResult(AutocompletePredictionBuffer buffer) {
                            if (buffer == null)
                                return;

                            if (buffer.getStatus().isSuccess()) {
                                for (AutocompletePrediction prediction : buffer) {
                                    // How to get cityName here
                                }
                            }
                            buffer.release();
                        }
                    }, 15, TimeUnit.SECONDS);

Is this possible? How can I implement it? If I look for place details by placeId, I can't get that I want neither:

Places.GeoDataApi.getPlaceById(googleApiClient, placeId)
        .setResultCallback(new ResultCallback<PlaceBuffer>() {
            @Override
            public void onResult(PlaceBuffer places) {
                if (places.getStatus().isSuccess()) {
                    // How to get cityName here
                }
                places.release();
            }
        });

Thanks in advance!!

sample of autocomplete give leak DataBuffer error message

03-23 18:10:45.575 25173-25185/com.example.google.playservices.placecomplete E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (com.google.android.gms.location.places.PlaceBuffer@3ac0a41c)
3-23 18:10:57.262 25173-25173/com.example.google.playservices.placecomplete W/GmsClientEvents﹕ registerConnectionCallbacks(): listener zza{3b921345 id=0} is already registered
03-23 18:10:57.263 25173-25173/com.example.google.playservices.placecomplete W/GmsClientEvents﹕ registerConnectionFailedListener(): listener zza{3b921345 id=0} is already registered

Nearby places not loading in 9.4.0 [5.0.2, 6.0.1]

After updating dependencies for places from 9.2.0 to 9.4.0, the nearby places does not function properly. My location is by landmarks and the 'Select this location' and 'Or choose a nearby place' is empty. The device I am testing on is HTC M7 with Android 5.0.2 as well as LG G5 with Android 6.0.1.
#5.0.2 Direct Issues

  • I am unable to select places that appear around me unlike 6.0.1
  • When moving the map to focus on other places, the nearby places list does not populate / refresh
  • Nearby places will populate if I move the map away from my current location and press the GPS FAB (a noticeable length away from my current location)
    #6.0.1 Direct Issues
  • When moving the map to focus on other places, the nearby places list does not populate / refresh
  • The nearby places list seems to refresh when I click the GPS FAB
  • I am only able to select places that are a red circle with a white square on the inside instead of selecting places further away like in 9.2

Placepicker UI

How can i get places as place type(restaurant, ...) in placepicker UI dialog?
Placepicker.build have only method to set bound.

Launching Place Picker intent destroys the launcher activity

On Launching Place Picker intent, onStop() is called on launcher activity and the onDestroy is called() from the system. This is causing instabilities in the behaviour of the application.

OS: Android 5.0
Device: Samsung SM-N900
PlayServices Version: 8.7.03 (2645110-238)

We are not able to reproduce this on other devices with the same OS version or on the latest emulator.

regarding to error in places api

Error contacting api :
status{status code = PLACES_API_KEY_INVALID , resolution = null}

i have inserted the same package name as declared in manifests file and enable the enable the google places api as well. But still I am getting the same error. please help me to resolve it.

Place Picker App (Place Picker generic UI Widget) is working on Emulator( API version 21) but not working on Google Nexus 5 and Samsung S2 devices

I am facing a problem in running place picker app on two devices ( Google Nexus 5 and Samsung S2).
It is working fine on Emulator with API version 21.

Place Picker app launches on device successfully but when we click on "Pick a place" link, place picker UI opens for a second but after that it is closed and the main activity is visible. It hapens every time when user will click on "Pick a place" link.

So i am not able to select/pick a place by using place picker UI widget.

Any help in resolving or finding root cause will be appreciated.

App Crash: protected FilterResults performFiltering(CharSequence constraint)

If you update the "mResultList" object in performFiltering, the app will crash as it is updating the object on a background thread while trying to update the list. Please update the "mResultList" object in the publishResults method before notifying data set changed.

To get the crash add and remove characters quickly.

PLACES_API_ACCESS_NOT_CONFIGURED

I'm trying out the PlaceComplete example.
Getting - Error getting autocomplete prediction API call: Status{statusCode=PLACES_API_ACCESS_NOT_CONFIGURED, resolution=null}

What might cause this?
Thank you!

Recent search + add work, home location

Hi, So i am using android Autocomplete widget. I was wondering how can i add recent places and add work, home location after i select a location. Any help will be appreciated.

Proguard Config?

Can someone please let me know the proguard config for Places API??

Thanks!

PlacePicker.IntentBuilder returns with resultCode 2

Starting the place picker ('Pick a Place') very briefly shows the place picker and then closes it before a place can be selected.

The returned resultCode is 2.

Running on Nexus 5, android 5.1.

Any ideas?

Autocomplete not working

i get this warning and nothing happen
"W/BaseAppContext: Using Auth Proxy for data requests."

android google place picker "android.os.BinderProxy"

Hi,
I am using google place picker for in android but when it opens it immediately stop before you can pick a place.
This is the code:

try {

PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
startActivityForResult(builder.build(this), PLACE_PICKER_REQUEST);

  } catch (GooglePlayServicesRepairableException e) {
e.printStackTrace();
} catch (GooglePlayServicesNotAvailableException e) {
e.printStackTrace();
 }

This is the error i am getting.

token=android.os.BinderProxy@3431c3eb
Timeline: Activity_idle id: android.os.BinderProxy@3431c3eb time:37045782

Unknown status code: 9001

I have run this application but getting this error even though I enable google Places API

Please help me on this

Latitude and Longitude

Can i get Latitude and Longitude from response? I have point out place from Autocomplete to my map.

I am using one of my server api to show history of place where my user have visited in same autocomplete textview and for that i am getting latitude and longitude from server.

Cant Pick A Place

i have update the api key in the manifest file, but when i run the app and click , Pick a place. it just loads and brings me back to the same page . i am unable to pick any place.

Getting Google play services out of date error.

05-07 08:28:49.291 13922-13922/com.example.google.playservices.placepicker W/GooglePlayServicesUtil﹕ Google Play services out of date. Requires 8487000 but found 6599434
05-07 08:28:49.295 13922-13922/com.example.google.playservices.placepicker E/GooglePlayServicesUtil﹕ GooglePlayServices not available due to error 2

How i can filter result by cities?

When i try use filter AutocompleteFilter.create(Arrays.asList(Place.TYPE_LOCALITY) i always get network error, but sample work fine when i set filter as null

License

I am using the PlaceComplete sample code in my work and it is great. I just want to thank you for your work. I am about to release my first app, and I do not really know how to handle apache license 2.0. What should I do to prevent violation of the license? I am fresh in android, can you give me exact steps I should do.

Thank you again for you work.
Best Regards
Peter

PLACES_API_INVALID_APP

I am trying the PlaceComplete example on both simulator and real device.
I always got this error:

Error contacting API: Status{statusCode=PLACES_API_INVALID_APP,resolution=null}

What causes this error?
Thank you!

How to use same api key for both maps and places in andorid

I am using licensed google maps. So Google created separate project for maps. In that project I have created one api key(SHA1 fingerprint;package name).

Now I want to use Places API for android. For that I think we need one more api key.

But manifest file allows only one key.

Place Detection API is returning INTERNAL_ERROR

PlaceLikelihoodBuffer{status=Status{statusCode=INTERNAL_ERROR, resolution=null}, attributions=null}

PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi.getCurrentPlace(googleApiClient, null);
        result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {
            @Override
            public void onResult(PlaceLikelihoodBuffer likelyPlaces) {
                Log.e(likelyPlaces.toString());
                try {
                    // my code
                }finally {
                    likelyPlaces.release();
                }
            }
        });

Unknown status code: 9001

Always get this error (9001), I already replace my API key.

E PlaceAutocompleteAdapter: Error getting autocomplete prediction API call: Status{statusCode=unknown status code: 9001, resolution=null}

Btw, PlacePicker works fine, even I don't need an API key.
Thanks.

AutoComplete Error

I followed the exact steps ,but AutoComplete is always throwing 'Timeout' error.Also getting below error in logcat :
java.lang.RuntimeException: Handler (android.os.Handler) {42ac3cd0} sending message to a Handler on a dead thread

PLACE_API_INVALID App

Hi i am getting API invalid error message, i given my API Key which i configured in google place - API. Can you help me out !
Thanks.

Place picker

when I used the Places picker but it did't work and log show : showStatusIcon on inactive InputConnection.

problems to get this project working in eclipse

hey

i got an error after importing the autocomlete prohect in the in the folder of values v21 ->base-template-styles.xml
rhe following lines of stley returns me compile error
<style name="Theme.Base" parent="android:Theme.Material.Light">
</style>
the error is "error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'."
can somebody please help me how to solve it?

PlacePicker activity doesn't call `onActivityResult` when nothing is selected

Here is the code that i have tried but when the user doesn't select anything and just return back the activity doesn't call the onActivityResult

I called the PlacePIcker as

googleMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
        @Override
        public void onMapClick(LatLng latLng) {
            try {
                googleMap.clear();
                PlacePicker.IntentBuilder intentBuilder =
                        new PlacePicker.IntentBuilder();
                Intent intent = intentBuilder.build(getApplicationContext());
                startActivityForResult(intent, 5);
            } catch (GooglePlayServicesRepairableException e) {
                e.printStackTrace();
            } catch (GooglePlayServicesNotAvailableException e) {
                e.printStackTrace();
            }
        }
    });

The onActivityResult() method

if (requestCode == 5 && resultCode == RESULT_OK) {
        Toast.makeText(this,"here",Toast.LENGTH_SHORT).show();
        if (data != null) {
            Place place = PlacePicker.getPlace(data, this);
            if (place != null) {
                lat = place.getLatLng().latitude;
                lng = place.getLatLng().longitude;
                MarkerOptions marker = new MarkerOptions().position(
                        place.getLatLng()).title("Hello Maps"); marker.icon(BitmapDescriptorFactory
                        .defaultMarker(BitmapDescriptorFactory.HUE_RED));
                      googleMap.addMarker(marker);
            } else{
                Toast.makeText(this,"place",Toast.LENGTH_SHORT).show();
                MarkerOptions marker = new MarkerOptions().position(
                        new LatLng(latitude, longitude)).title("Hello Maps");
                lat = latitude;
                lng = longitude;
                // Changing marker icon
                marker.icon(BitmapDescriptorFactory
                        .defaultMarker(BitmapDescriptorFactory.HUE_ROSE));

                // adding marker
                googleMap.addMarker(marker);
            }
        } else{
            Toast.makeText(this,"data",Toast.LENGTH_SHORT).show();
            MarkerOptions marker = new MarkerOptions().position(
                    new LatLng(latitude, longitude)).title("Hello Maps");
            lat = latitude;
            lng = longitude;
            // Changing marker icon
            marker.icon(BitmapDescriptorFactory
                    .defaultMarker(BitmapDescriptorFactory.HUE_ROSE));

            // adding marker
            googleMap.addMarker(marker);
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.