ERROR_OPERATION_FAILED Status Code on using Google Places Api in Android -


i using this tutorial create autocomplete search box. have created custom adapter populate autocomplete text box.

mgoogleapiclient = new googleapiclient.builder(activitymap.this)             .addapi(places.geo_data_api)             .enableautomanage(this, google_api_client_id, this)             .addconnectioncallbacks(this)             .addonconnectionfailedlistener(this)             .build();               pendingresult<autocompletepredictionbuffer> results =         places.geodataapi.getautocompletepredictions(mgoogleapiclient,                                                     constraint.tostring(),                                                      mbounds, null); 

however, receiving following error message follows:

{statuscode=error_operation_failed, resolution=null} 

for following lines of code in getpredictions method in adapter

final status status = autocompletepredictions.getstatus();         if (!status.issuccess()) {             toast.maketext(getcontext(), "error: " + status.tostring(),                     toast.length_short).show();             log.e(tag, "error getting place predictions: " + status.tostring());             autocompletepredictions.release();             return null;         } 

ps: in lines:

pendingresult<autocompletepredictionbuffer> results =                 places.geodataapi                         .getautocompletepredictions(mgoogleapiclient, constraint.tostring(),  mbounds, mplacefilter); 

i have tried changing mplacefilter null, same result

finally, figured out. writing different api key in android manifest.

also, if using google api key more 1 application, specify key once (using android tutorials setup guide) , enable support other api's within same project.


Comments