1
votes

My Device has one foreground service which needs to work on 24/7. Sometimes when gms update happen, it kills all gms services & restart them.

My service is also using gms(firbase AuthService), so it also gets killed & start again.

How to stop updating My service when other gms services gets updated. I need to prevent my service not to start again while gms update.

Here are some logs:--

ActivityManager: Scheduling restart of crashed service com.google.android.gms/.chimera.UiIntentOperationService in 200987ms 08-19 12:23:50.474 3604 3649 I ActivityManager: Killing 13131:com.google.android.gms/u0a25 (adj 0): stop com.google.android.gms 08-19 12:23:50.477 3604 3649 W ActivityManager: Scheduling restart of crashed service com.google.android.gms/com.google.firebase.auth.api.gms.service.FirebaseAuthService in 120977ms 08-19 12:23:50.478 3604 3649 W ActivityManager: Scheduling restart of crashed service com.google.android.gms/.chimera.GmsIntentOperationService in 180976ms 08-19 12:23:50.482 3604 3649 I ActivityManager: Killing 13093:com.zebra.devicetrackercloud/u0a184 (adj 0): stop com.google.android.gms 08-19 12:23:50.483 3604 3649 W ActivityManager: Scheduling restart of crashed service com.zebra.devicetrackercloud/.TrackingService in 923852ms 08-19 12:23:50.483 3604 3649 W ActivityManager: Scheduling restart of crashed service com.zebra.devicetrackercloud/.csp.NGDTCspService in 963852ms 08-19 12:23:50.484 3604 3649 W ActivityManager: Force removing ActivityRecord{cf6c3b3 u0 com.zebra.devi cetrackercloud/.MainActivity t10}: app died, no saved state

Thanks!.

1
"How to stop updating My service when other gms services gets updated" -- stop using GMS. presumably. "My Device has one foreground service which needs to work on 24/7" -- unless you are running this on custom firmware, this is not possible. Eventually, Android will terminate your process, even with the foreground service. - CommonsWare
Hi @CommonsWare, Thanks for reply, please look t here some points 1. I need to use GMS(for firebase auth). 2. We have own hardware device with AOSP. 3. is it possible, is it possible to exclude my app update(kill & start again) whenever gms update happens! - Madhukar
I have the same problem on a TC51 Zebra with Android 7.1.2, @Madhukar have you found a solution for this problem? - Alessandro Caliaro
@AlessandroCaliaro There is no straight forward solution for this. disabling auto updates settings from playstore app is the only solution i found. My hack was, once IllegalStateException occurs, catch the exception & do authentication again. - Madhukar
@AlessandroCaliaro as of version 20.0.0 of the Firebase Authentication Android SDK (which is included in version 26.0.0 of the Firebase Android BoM), Firebase Authentication no longer depends on Google Play services. if authentication is done without play services then GMS update won't affect application. - Madhukar

1 Answers

0
votes

firebase-auth v20.0.0is the first firebase-auth version that does not require GMS[1]. It looks like support for non-gms devices was added for firebase-ui in version7.1.0[2]. Cloud Functions,Cloud Firestore and Firebase Realtime Database do not have a dependency on GMS.