Prevent pausing location updates on background when stationary?

Hello,

I'm trying to receive location updates on background mode but it only lasts about 10 minutes then it stops when API detected the "isStationary" is true.

Is there any way to continue receiving updates even when the device is stationary?

Btw app is not terminated by the user.

I'm using CLLocationUpdate.liveUpdates(.otherNavigation) API. CLBackgroundActivitySession is created before calling the liveUpdates.

CLLocationManager:

let manager: CLLocationManager = {
        let manager = CLLocationManager()
        manager.distanceFilter = kCLDistanceFilterNone
        manager.desiredAccuracy = kCLLocationAccuracyThreeKilometers
        manager.pausesLocationUpdatesAutomatically = false
        manager.activityType = .other
        manager.showsBackgroundLocationIndicator = true
        manager.allowsBackgroundLocationUpdates = true
        return manager
    }()

Thank you!

Answered by Engineer in 806334022

Using location updates in order to perform arbitrary functions like trying to keep a web socket active is not a valid use case.

As explained in App Review Guidelines

2.5.4 Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.


Argun Tekant /  DTS Engineer / Core Technologies

what is the use-case ? Why duplicate locations are required ? For now there is no other way to receive locations once stationary is detected.

To ensure the app remains active in the background to prevent the WebSocket connection from being disconnected.

Using location updates in order to perform arbitrary functions like trying to keep a web socket active is not a valid use case.

As explained in App Review Guidelines

2.5.4 Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.


Argun Tekant /  DTS Engineer / Core Technologies

Prevent pausing location updates on background when stationary?
 
 
Q