That pop-up usually occurs due to having following methods in code
GoogleApiAvailability.makeGooglePlayServicesAvailable
GoogleApiAvailability.showErrorDialogFragment
GoogleApiAvailability.getErrorDialog
In order to overcome this, having a control like below should be helpful and works on my case
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
int errorCode = googleApiAvailability.isGooglePlayServicesAvailable(this);
googleApiAvailability.makeGooglePlayServicesAvailable(this);
googleApiAvailability.showErrorNotification(this, errorCode);
googleApiAvailability.showErrorDialogFragment(this, errorCode, 100);
Dialog errorDialog = googleApiAvailability.getErrorDialog(this, errorCode, 100);
errorDialog.show();
errorDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
Log.d(TAG, "Play pop-up has been dismissed!");
}
});
Alternatively, it is also possible to utilize isGooglePlayServicesAvailable method and handle its return states SUCCESS, SERVICE_MISSING, SERVICE_UPDATING, SERVICE_VERSION_UPDATE_REQUIRED, SERVICE_DISABLED, SERVICE_INVALID