AutoLocation Customizable Geofence Responsiveness

Discussion in 'AutoApps' started by RicardoG, Jun 16, 2020.

  1. RicardoG

    RicardoG New Member

    Jun 28, 2019
    Likes Received:
    Hi Joao,

    I have been doing some research regarding geofences these days. Based on my tests it's true that enabling geofences seems monitors to request for locations more frequently than usual (about 20-25 requests per hour depending on whether the phone is active or slept, instead of 5-7 requests on normal usage). Documentation already says it: "Background apps can receive geofencing transition events more frequently than updates from the Fused Location Provider."

    Since in many cases we might want those request not to be as frequent as the default values (based on documentation, the latency is about 2-3 minutes on average, or near 6 if the phone was stacionary for a long time), could you implement "Notification Responsiveness" on AutoLocation? More info here:

    Even though geofences are battery-friendly, a low latency could lead to more battery drain. And as documentation says: "Setting a big responsiveness value, for example 5 minutes, can save power significantly". Default value is 0. I think it could be very easy to implement, adding a textfield on AutoLocation and passing that info to that Geofence Builder's method.

    In my case, I would appreciate it, since I don't need a very high responsiveness for my geofences.

    Last edited: Jun 16, 2020
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Feb 3, 2015
    Likes Received:
  3. RicardoG

    RicardoG New Member

    Jun 28, 2019
    Likes Received:
    Hi Joao,

    Sorry for the delay, I didn't receive any email notifying your reply o_O

    I have tried your app and it crashes when trying to start geofence monitor (or adding a new geofence). This is the error:

    com.joaomgcd.autolocation version 1.2.3

    OS Build GM1903_14_200519
    OS Code 29
    Device GM1903
    Manufacturer OnePlus
    Product OnePlus7_EEA

    java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
    at com.joaomgcd.common.w.c(SourceFile:148)
    at com.joaomgcd.autolocation.a.f.a(Unknown Source:8)
    at com.joaomgcd.autolocation.a.f.b(SourceFile:6)
    at com.joaomgcd.autolocation.a.b.i(SourceFile:242)
    at com.joaomgcd.autolocation.util.e.a(SourceFile:119)
    at com.joaomgcd.autolocation.util.e.a(SourceFile:32)
    at com.joaomgcd.autolocation.util.r.a(SourceFile:113)
    at com.joaomgcd.autolocation.util.r.b(SourceFile:148)
    at com.joaomgcd.autolocation.activity.ActivityMain$3$1.a(SourceFile:122)
    at com.joaomgcd.autolocation.activity.ActivityMain$3$
    at com.joaomgcd.autolocation.util.r.<init>(SourceFile:55)
    at com.joaomgcd.autolocation.util.e.<init>(SourceFile:38)
    at com.joaomgcd.autolocation.util.e.a(SourceFile:46)
    at com.joaomgcd.autolocation.activity.ActivityMain$3.onPreferenceClick(SourceFile:117)
    at android.preference.Preference.performClick(
    at android.preference.PreferenceScreen.onItemClick(
    at android.widget.AdapterView.performItemClick(
    at android.widget.AbsListView.performItemClick(
    at android.widget.AbsListView$
    at android.os.Handler.handleCallback(
    at android.os.Handler.dispatchMessage(
    at android.os.Looper.loop(
    at java.lang.reflect.Method.invoke(Native Method)

    I don't know if it's related to that crash but, where is it supposed to be introduced the geofence responsiveness? I have seen the option to enable/disable it on "Advanced" but not the option to customize the responsiveness in millis.

    By the way, I have seen a minor but which I think it's there too on older version:

    This is how the dialog appears when selecting first geofence:


    And this is how the dialog appears when selecting latest geofence on the list:


    This is a minor error, not a problem, just to let you know :)

    Regards and thank you very much again.
    virtual likes this.

Share This Page