cordova - Reliable Background Geolocation Service on Android in JavaScript -
the app should track user in background, calculations on locations received , notify user of events of interest.
the logic has been written in javascript (for post-mortem analysis). so, not re-implement same in java/swift, i'm aiming cordova/reactnative/nativescript/titanium.
android kill backgrounded app in tight memory conditions. make background operation more reliable, android service used. 1 make service "foreground" tell os user aware of service , service of importance user. os kill such app/service process. when ask re-start service asap.
the problem looks javascript vm not started service , there no way run javascript logic. same problem frameworks mentioned.
thus, service must all-native , re-implementation of logic.
questions:
are findings correct? i.e. in either mentioned framework there no easy way re-start javascript vm service?
somewhere on saw trick service ran (invisible) activity instantiated vm again. possible? can give link/explanation?
how android kill process hosting "foreground" service? maybe ignore case.
thank you.
i have app reliant on reliable background geolocation on android (and ios).
after trying many approaches (including own native solutions) have settled on cordova-background-geolocation-lt (also available react native , nativescript).
it's paid-for solution (not free), there's reason that: in extensive real-world field testing, solution work reliably on os versions (including android 8 , ios 11) - android 8 in particular challenge due new background geolocation limits.
in answer questions, in practice have found solution reliable on android when using foregroundservice option, app able run continuously several hours no interruption.
Comments
Post a Comment