android - PlaceAutoComplete not working in signed apk -
i have strange issue. placeautocomplete working fine in debug apk. in signed apk, autocomplete fragement shows, if type returns previous screen without doing anything. here snippet mainactivity:
try { intent intent = new placeautocomplete.intentbuilder(placeautocomplete.mode_fullscreen) .build(mainactivity.this); startactivityforresult(intent, place_autocomplete_request_start); }catch(googleplayservicesrepairableexception e){ // todo: handle error. toast.maketext(mainactivity.this, "error in googleplayservicesrepairable", toast.length_long).show(); }catch(googleplayservicesnotavailableexception e){ toast.maketext(mainactivity.this, "error in playserviesnotavbl", toast.length_long).show(); // todo: handle error. }
btw, none of toast messages coming, i'm not sure if problem there.
my androidmanifest file below permissions
<uses-permission android:name="android.permission.access_coarse_location" /> <uses-permission android:name="android.permission.access_fine_location" /> <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices"/> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state"/>
(not sure if access_network_state , read_gservices required. added these 2 after reading here on stackoverflow solved users problem
this driving me nuts. there library need add production apk? size seems 1 mb less debug one....
thanks in advance
note api key fine same works in debug mode
the problem combination of 2 things -
1) publish key not available mentioned in comment - https://developers.google.com/places/android-api/signup#release-cert - however, want add don't need different api key prod, can add signed fingerprint existing api (please see link)
and
2) had add api key release/google_maps_api.xml mentioned answer - https://stackoverflow.com/a/30559898/5662769
hope helps else too
thanks helped out
Comments
Post a Comment