I am building an Android app that uses maps through Google Play Services.
In the app I am checking that Google Plays Services are installed with following function: GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable
. If Google Play Services are not available I am displaying a message: "Please install Google play services to continue."
How can I test it in the emulator or on device? How can I emulate the case when Google Play Services are not available or are not correct version? On my device Google Play Services are installed, so my app always goes the happy path. Same on emulator. I would like to check that my app does not crash on devices without Google Play Services but shows an instruction.
You may want to do "Uninstall Updates" of the Google Play Services by going to Settings > Apps > Google Play Services > Uninstall Updates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With