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
Based on Rahim's code, I add the capability of preventing the user to dismiss the Google Play Services dialog (by hitting the back button) and continue using the app without Google Play Services installed:
private void checkGooglePlayServicesAvailable() {
int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if (status != ConnectionResult.SUCCESS) {
if (GooglePlayServicesUtil.isUserRecoverableError(status)) {
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(status, this, 0);
dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialogInterface) {
MainActivity.this.finish();
}
});
dialog.show();
} else {
Toast.makeText(this, "This device is not supported.", Toast.LENGTH_LONG).show();
finish();
}
}
}