Anyone using a Background Location plugin successfully on AndroidX?

Hey,

I’ve been building and rebuiding so many different background location plugins in an effort to find one that remains working for AndroidX - to no success.

Has anyone else had any success with a plugin that remains compatible?

Thanks,

James

Ooof after spending most of the day hunting I was able to get the following working with a second plugin:

  <plugin name="cordova-android-play-services-gradle-release" />
  <plugin name="cordova-background-geolocation-plugin" />

Incase it helps anyone else!

James

Thanks for posting this!

I do like this, not implying it’s optimal:

    <plugin name="cordova-plugin-background-mode"/>
    <plugin name="@mauron85/cordova-plugin-background-geolocation">
        <variable name="GOOGLE_PLAY_SERVICES_VERSION" value="11+" />
        <variable name="ANDROID_SUPPORT_LIBRARY_VERSION" value="23+" />
        <variable name="ICON" value="@mipmap/ic_launcher" />
        <variable name="SMALL_ICON" value="@mipmap/ic_launcher" />
        <variable name="ALWAYS_USAGE_DESCRIPTION" value="The app needs background location tracking" />
        <variable name="MOTION_USAGE_DESCRIPTION" value="Accelerometer use increases battery efficiency by intelligently toggling location tracking" />
    </plugin>
    <plugin name="cordova-android-support-gradle-release"/>

It works, but how reliably it runs in the background is another story, as the OS can take down any application if it needs to (except services?)