3

The Amazon app store requires that apps on their store don't contain Google Play Services. The app i'm working on uses Play Services in lots and lots of places. I'm trying to disable play services rather than create a separate branch with all of the Play Services functionality removed. Is this possible?

The current problem is that a dialog pops up with the title of this question as the message. Is it possible to disable that dialog, or destroy it before it is displayed to the user?

davehenry
  • 1,026
  • 9
  • 24
  • 4
    You have two options: a) Make a flavor without any Google Play code. This will be more difficult to maintain but will shave valuable bytes off your APK. b) Add a whole bunch of `if (GoogleApiAvailablity.getInstance().isGooglePlayServicesAvailable(context) == 0) {...}` *which you should be doing anyway* since there are many cases where the user doesn't have Play services properly set up or up-to-date or what not. – Eugen Pechanec Apr 13 '17 at 15:36
  • Thanks @EugenPechanec, option a is unattractive as we already have several flavors that would all need to be duplicated to support a non-play services version. Regarding b, we've got that check throughout the codebase. Do you know if we need to add it for Firebase service calls as well? – davehenry Apr 13 '17 at 15:56
  • 1
    It seems that [Firebase depends on the Google Play package](https://firebase.google.com/docs/cloud-messaging/android/client#sample-play). Admittedly, Firebase push messages can do with an older version of GMS (than the interface library we include in apps), however they can't do with no version of GMS at all. I haven't tested other Firebase features. – Eugen Pechanec Apr 13 '17 at 16:08

0 Answers0