Android activity in the background - GPS recording
source link: https://www.codesd.com/item/android-activity-in-the-background-gps-recording.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Android activity in the background - GPS recording
I'm developing application where I have Activity that records GPS positions. It registers for LocationListener updates and stores recorded Location to SQLite database. My problem is that when the user hides my app or runs another app, my app and recording activity goes to background and may be killed by system. Thus, no GPS data is stored. I want that my app and recording activity still records GPS locations even if the app goes to background. How to achieve that?
Thanks
A Service is the best for what you intend to do.
Make shure you start the service STICKY
Related Articles
Enabling Android activity through the background service
can we call an Android activity of the Phonegap project?
Twilio iOS Client - Stay active in the background
How to start a map activity in the background and see it if needed in Android?
Hide Android speech recognition activity in the background?
Android - Back ArrayList to activity from the background thread
Android: Scrollview stretches the background image
How to run the activity in the background?
Android SpannableString defines the background behind some of the text
Android countdown in the background
Android ListFragment changes the background color of the line individually
Android - Run in the background - Service vs Java standard class
Push the Android app to the background
Android notifications on the background service
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK