I have a very strange issue. PlaceAutoComplete was working fine in my debug apk. But now in my signed apk, the autocomplete fragement shows, but if i type anything it just returns back to the previous screen without doing anything. Here is the snippet from my MainActivity:
try {
Intent intent =
new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_FULLSCREEN)
.build(MainActivity.this);
startActivityForResult(intent, PLACE_AUTOCOMPLETE_REQUEST_START);
}catch(GooglePlayServicesRepairableException e){
// TODO: Handle the 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 the error.
}
Btw, none of the Toast messages are coming, so I'm not sure if the problem is there.
My AndroidManifest file is as below for the 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 and READ_GSERVICES are required. I added these 2 after reading here on StackOverflow that it solved some users problem
This is really driving me nuts. Is there any library that I need to add to my production apk? The size seems almost 1 mb less than the debug one....
Thanks in advance
Note that API key is fine as the same works in debug mode