@Override
              public void onClick(DialogInterface dialog, int whichButton) {
                Intent intent =
                    new Intent(
                        Intent.ACTION_VIEW,
                        Uri.parse(GOOGLE_PLAY_SERVICES_INSTALL_FROM_GOOGLE_PLAY));
                try {
                  startActivity(intent);
                } catch (ActivityNotFoundException e) { // if no Google Play app
                  startActivity(
                      new Intent(
                          Intent.ACTION_VIEW,
                          Uri.parse(GOOGLE_PLAY_SERVICES_INSTALL_FROM_WEB_BROWSER)));
                }
              }
Prompt to download Google Play Services from Google Play.
java/com/google/android/apps/authenticator/AuthenticatorActivity.java