Still running app after clicking home button or display turn off #13633
-
Do I have to write a service to collect e.g. GeoLocation after clicking home button or the display turn off. I checked the tracker-app but could not figure out the mechanism, that the author implements to track GeoLocation after display turn off. Or would it be enough to skip |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Check https://titaniumsdk.com/api/titanium/android/service.html#background-location-service-example |
Beta Was this translation helpful? Give feedback.
Check https://titaniumsdk.com/api/titanium/android/service.html#background-location-service-example
That app is 8 years old and the Android eco system changed a lot! There are way more permissions you'll have to accept now in order to access location in the background. And you have to run a foreground service.
First think I would add is
exitOnClose: false
so it will put the app to background all the time and not close the app.Also check https://github.com/m1ga/titanium_background_app