Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoogleApiAvailability.isGooglePlayServicesAvailable(Context context) always return SUCCESS #2309

Open
papjul opened this issue Apr 10, 2024 · 3 comments
Labels

Comments

@papjul
Copy link

papjul commented Apr 10, 2024

Describe the bug
As a library used as a substitute for Google libraries, the function should have the expect behavior. Currently, this return SUCCESS on devices with neither Google Play Services or microG services.

To Reproduce
See the code, it's self-speaking:
https://github.com/microg/GmsCore/blob/v0.3.1.240913/play-services-base/src/main/java/com/google/android/gms/common/GoogleApiAvailability.java#L160-L164

Expected behavior
The function should return one of the following:

  • ConnectionResult.SERVICE_MISSING if com.google.android.gms is not installed
  • ConnectionResult.SERVICE_UPDATING if ̀com.google.android.gms is currently updating and is not available
  • ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED if the lib version by the app is incompatible with com.google.android.gms version (must handle both microG and Google Play versions).
  • ConnectionResult.SERVICE_DISABLED if user has disabled com.google.android.gms package
  • ConnectionResult.SERVICE_INVALID for example if the signature of the com.google.android.gms package is not Google or microG signature, if failed to parse Manifest, etc
  • ConnectionResult.SUCCESS finally, if com.google.android.gms succeeded in all checks, this is what should be returned

I think the most important things to do in priority are: package is installed, not disabled and signature is valid.

Additional context
I intend to use play-services-location as a subtitle library in Breezy Weather, see breezy-weather/breezy-weather#901

@CoelacanthusHex
Copy link
Contributor

CoelacanthusHex commented Apr 10, 2024

@fynngodau implemented this dummy implementation in #1398 3 years ago...

@papjul
Copy link
Author

papjul commented Apr 10, 2024

That's not the same thing, we use isGooglePlayServicesAvailable (Context context), not isGooglePlayServicesAvailable (Context context, int minApkVersion)

@papjul papjul changed the title GoogleApiAvailability.isGooglePlayServicesAvailable() always return SUCCESS GoogleApiAvailability.isGooglePlayServicesAvailable(Context context) always return SUCCESS Apr 10, 2024
@CoelacanthusHex
Copy link
Contributor

Oh, my bad. I don't notice the different parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants