Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test an android app with non-existing or outdated Google Play Services?

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.

like image 575
Evgenii Avatar asked Feb 08 '23 04:02

Evgenii


1 Answers

You may want to do "Uninstall Updates" of the Google Play Services by going to Settings > Apps > Google Play Services > Uninstall Updates.

like image 198
gerardnimo Avatar answered Feb 11 '23 01:02

gerardnimo