I\'m using ACRA (arca.ch) to generate automatic error reports.
I just released a new version of my app using Google Maps Android API v2. I\'m getting an error repor
An update of the answer by @Nevermore, since GooglePlayServicesUtil
methods are deprecated in favour of GoogleApiAvailability
:
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
int resultCode = googleApiAvailability.isGooglePlayServicesAvailable(activity.getApplicationContext());
if (resultCode == ConnectionResult.SUCCESS) {
activity.selectMap();
} else if (resultCode == ConnectionResult.SERVICE_MISSING ||
resultCode == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED ||
resultCode == ConnectionResult.SERVICE_DISABLED) {
Dialog dialog = googleApiAvailability.getErrorDialog(activity, resultCode, 1);
dialog.show();
}
Note the order of the first two parameters in getErrorDialog()
has been switched around in the GoogleApiAvailability
implementation.