2

We have an app that receives push notifications through some third party services that wrap Firebase messaging. After a recent library update, we started seeing com.google.android.location.ALARM_WAKEUP_ACTIVITY_DETECTION at high volume in the play store.

We're not using geofencing anywhere in the app, and my conversations with the third party representatives I've talked to, they aren't firing it either. There isn't much documentation around this intent aside from the fact that it is fired by LocationListener. I've been trying to find out when this intent is fired aside from geolocation subscriptions and not having much luck. I'm also not able to reproduce the issue locally, though according to play store vitals over 5% of my users have experienced this over 10 times / hr.

Does anyone know where com.google.android.location.ALARM_WAKEUP_ACTIVITY_DETECTION is used, how its usage differs from com.google.android.location.ALARM_WAKEUP_LOCATOR, and what could cause it to be fired excessively from the background aside from geolocation?

wshelor
  • 363
  • 2
  • 14
  • Possible duplicate of: [Excessive Alarm Manager wakeups in android with Google Play Services Location](https://stackoverflow.com/questions/46115912/excessive-alarm-manager-wakeups-in-android-with-google-play-services-location) – Martin Zeitler Apr 17 '19 at 01:40

3 Answers3

2

The ALARM_WAKEUP_LOCATOR is used by the new location API of google: FusedLocationProviderClient . It's use while an application is trying to have a location update. For the ALARM_WAKEUP_ACTIVITY_DETECTION, is just a guess, but I think it's coming from the ActivityTransition API which allows you to detect the current activity of a user, among those :

  • IN_VEHICLE
  • ON_BICYCLE
  • RUNNING
  • STILL
  • WALKING

May worth a glance!

1ud0v1c
  • 75
  • 1
  • 9
2

ALARM_WAKEUP_LOCATOR is used while an application is trying to have a location update. While ALARM_WAKEUP_ACTIVITY_DETECTION do location update when person having the device in an environment/surroundings where a sound much like alarm(high pitch sound/not conversation) is playing whether he moves or not. It can be used in some working environments,mock drill assessment or even automated works. Well in your case if you are not geo-fencing then if you are requesting location then set low priority for it. For this reading this might be useful.

Vanshaj Daga
  • 2,145
  • 11
  • 18
  • Wait, so your theory is that ALARM_WAKEUP_ACTIVITY_DETECTION is related to sound, and that this is happening because a location with low priority is set but it's related to background noise? That isn't mentioned in the associated link, and I find it hard to believe- where do you get your info about ALARM_WAKEUP_ACTIVITY_DETECTION? – wshelor Apr 16 '19 at 19:04
  • @wshelor It is not directly implemented in android as it is a library that is often used by fitness apps / bands. One such example is "Sleep as android". See their GIT as well as this is worth a read https://forum.xda-developers.com/oneplus-6/help/insanely-alarms-com-google-android-t3883160 – Vanshaj Daga Apr 17 '19 at 22:06
  • I'm convinced. Looks like one of my third parties must be listening for location updates, and some third party like sleep as android is kicking it off. Strange problem, and I'm not entirely sure how to resolve it, but as long as it doesn't actually directly correlate to an immediate problem for my users I think it might be okay. Thanks for the help Vanshaj! – wshelor Apr 19 '19 at 00:44
0

I am trying to explore this phenomenon. Meanwhile, are there any patterns that you can find out from the Vitals Dashboard?

There are a few pointers which can give us some clues.

  1. Is this happening in specific phones? Ex. Vivo or Samsung
  2. Is this happening in specific versions of Android . Ex : > 8.0
  3. As part of the library update, was there any update to Play Services dependencies too?
Dinesh
  • 948
  • 6
  • 11
  • 1. Nope, it was pretty consistent among different devices. 2. Vitals only gives us 8.0+, but it didn't seem to be from just one or two of the versions. 3. Nope, as far as I can tell no play services changes. The volume has steadily been going down for me, though. The updated libraries were UrbanAirship, Instabug, and Braze. – wshelor Apr 26 '19 at 21:43