Skip to content

Conversation

@pm-dimagi
Copy link
Contributor

Product Description

This is to check if the play store is not updated or missing
Reference doc is here:https://developers.google.com/android/reference/com/google/android/gms/common/GoogleApiAvailability?utm_source=chatgpt.com

Not able to test this as 2 of my device is updated with the service

Technical Summary

Feature Flag

Safety Assurance

Safety story

Automated test coverage

QA Plan

Labels and Review

  • Do we need to enhance the manual QA test coverage ? If yes, the "QA Note" label is set correctly
  • Does the PR introduce any major changes worth communicating ? If yes, the "Release Note" label is set and a "Release Note" is specified in PR description.
  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

Dialog dialog = googleApiAvailability.getErrorDialog(this, status, PLAY_SERVICES_RESOLUTION_REQUEST,
dialog1 -> {
onConfigurationFailure(playServiceError,
"Google Play Services are required. Please update/install them.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pm-dimagi Please put in Strings.xml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (dialog != null) {
dialog.show();
} else {
onConfigurationFailure(googleApiAvailability.getErrorString(status),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pm-dimagi Please put in Strings.xml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private void checkGooglePlayServices() {
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
int status = googleApiAvailability.isGooglePlayServicesAvailable(requireActivity());
if (status != ConnectionResult.SUCCESS) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pm-dimagi I am also seeing some concept of googleApiAvailability.isUserResolvableError(resultCode) and then showing the dialog error with requestCode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger.log(LogTypes.TYPE_MAINTENANCE,"Google Play Services issue:" + playServiceError);
Dialog dialog = googleApiAvailability.getErrorDialog(this, status, PLAY_SERVICES_RESOLUTION_REQUEST,
dialog1 -> {
onConfigurationFailure(playServiceError,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of string error, pass play_services_$status as the failure code here and below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (status != ConnectionResult.SUCCESS) {
String playServiceError = googleApiAvailability.getErrorString(status);
Logger.log(LogTypes.TYPE_MAINTENANCE,"Google Play Services issue:" + playServiceError);
Dialog dialog = googleApiAvailability.getErrorDialog(this, status, PLAY_SERVICES_RESOLUTION_REQUEST,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think this should use this method instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


<string name="my_credentials">My Credentials</string>
<string name="credential">Credential</string>
<string name="play_service_update_error">Google Play Services are required. Please update/install them.</string>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think we can have one general message here - Please make sure Google Play services is supported on the device and is up to date instead of two.

We should also add translations in all languages here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still pending

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pm-dimagi pm-dimagi requested a review from shubham1g5 July 18, 2025 15:23
@pm-dimagi pm-dimagi merged commit 7341852 into Beta_2.58_474459 Jul 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-integration-tests Skip android tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants