chat-demo-android/src/main/java/com/twilio/chat/demo/LoginActivity.java
/**
     * Check the device to make sure it has the Google Play Services APK. If
     * it doesn't, display a dialog that allows users to download the APK from
     * the Google Play Store or enable it in the device's system settings.
     */
Check the device to make sure it has the Google Play Services APK. If
it doesn't, display a dialog that allows users to download the APK from
the Google Play Store or enable it in the device's system settings.
Check the device to make sure it has the Google Play Services APK . If it doesn ' t display a dialog that allows users to download the APK from the Google Play Store or enable it in the device ' s system settings .
private boolean checkPlayServices()
     {
         GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();
         int                   resultCode = apiAvailability.isGooglePlayServicesAvailable(this);
         if (resultCode != ConnectionResult.SUCCESS) {
             if (apiAvailability.isUserResolvableError(resultCode)) {
                 apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)
                     .show();
             } else {
                 logger.i("This device is not supported.");
                 finish();
             }
             return false;
         }
         return true;
     }
private boolean checkPlayServices ( ) { GoogleApiAvailability apiAvailability = GoogleApiAvailability . getInstance ( ) ; int resultCode = apiAvailability . isGooglePlayServicesAvailable ( this ) ; if ( resultCode != ConnectionResult . SUCCESS ) { if ( apiAvailability . isUserResolvableError ( resultCode ) ) { apiAvailability . getErrorDialog ( this , resultCode , PLAY_SERVICES_RESOLUTION_REQUEST ) . show ( ) ; } else { logger . i ( "This device is not supported." ) ; finish ( ) ; } return false ; } return true ; }
Check the device to make sure it has the Google Play Services APK.
Check the device to make sure it has the Google Play Services APK .