I'm kinda beginner in the Android development and I would like to ask you some questions maybe you have some idea for my problems.
I'm developing an Android app which main goals are the following:
- - Logging current GPS coordinates continuously (storing in database)
- - Logging accelerometer activities (X, Y, Z coordinates) (storing in db aswell maybe)
- - if there is an internet connection avalaible the stored coordinates (GPS and accelero) have to be uploaded to a web server with a web service
On the Layout (what the user see):
- - the current GPS coordinates should be preseneted
- - a few buttons to be able to make some actions onclick
- - users should be notified about the upload actions if they were success or not
I have already implemented the GPS and the "accelero" part of the app and I have no problem with UI part. I can also upload the data to a web server.
The UI part can be easily implemented in an Activity if I know it right that's what is an Activity is for.
My main problem is that where should I implement the GPS, the accelerometer and the uploading part to run on a background thread. I have heard about Services which are running in the background. Should I do something like that?
I implemented all these in one Activity which is very lame I know so I have to redesign my app and make it more faster and more professional for a mobile device.
I hope I was clear and you can help me. Any advice is welcomed!
Thank you for all your help,