These can be a little tricky to debug.  Especially if it takes a few hours
to occur.  Can you access the DDMS log from your device?  It will probably
offer some clues as to what it going on there.

On Wed, Nov 27, 2019 at 9:03 AM 'James' via CodenameOne Discussions <
[email protected]> wrote:

> Device: OnePlus running android 10
>
> I am experiencing issues with prolonged background app tracking on Android
> 10. It seems that after a period of time, the app is killed entirely and
> the background locations stop coming in.
>
> In build hints, I have android.xpermissions set to:
> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"
> /><uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"
> />
>
> I am starting location tracking like so:
>
> CommonUtil.log("Starting Tracking");
> LocationManager.getLocationManager().setLocationListener(new
> LocationListenerImpl(), new
> LocationRequest(LocationRequest.PRIORITY_MEDIUM_ACCUARCY, 1000 * 60 * 5));
> LocationManager.getLocationManager().setBackgroundLocationListener(LocationListenerImpl.class);
>
> I am also starting geofencing like so:
>
> LocationManager.getLocationManager().addGeoFencing(GeofenceListenerImpl.class,
> revisedGeofences.get(id));
>
> Upon entering a geofence, I simply increase tracking accuracy
>
> LocationManager.getLocationManager().setLocationListener(new
> LocationListenerImpl(), new
> LocationRequest(LocationRequest.PRIORITY_HIGH_ACCUARCY, 1000 * 60 * 2));
>
> All of this works fine for the first several hours, and then it suddenly
> stops until the app is manually opened. Any thoughts?
>
> --
> You received this message because you are subscribed to the Google Groups
> "CodenameOne Discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/codenameone-discussions/99b32a00-d82d-403a-bb17-60edd8e8f61f%40googlegroups.com
> <https://groups.google.com/d/msgid/codenameone-discussions/99b32a00-d82d-403a-bb17-60edd8e8f61f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Steve Hannah
Software Developer
Codename One
http://www.codenameone.com

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKXmZ7GnxP%2BTpokUHPsMk3QB73YyHynVY%3D32P3ro7tUqDw%40mail.gmail.com.

Reply via email to