Android Question GPS Log

bashka_abdyli

Member
Licensed User
Longtime User
Hello,

I have been searching all over forums but cannot find a reliable solutions for my scenario:

I want to log the GPS coordinates on a MySql DB every 10 sec.
I want it to work via a service, and auto start when android OS starts.

Please if someone has a working scenario please share with us.
 

NJDude

Expert
Licensed User
Longtime User
I want to log the GPS coordinates on a MySql DB every 10 sec.
You can read THIS tutorial to see how you can interact with a MySQL database, and to do it every 10 seconds you will need to use a TIMER

I want it to work via a service, and auto start when android OS starts.
Here is the documentation to create a SERVICE, and a tutorial to use SERVICES to start the service when Android starts just set it to START AT BOOT, you will see that in the Service module itself, top of the screen, like this:
B4X:
#Region Service Attributes
#StartAtBoot: True
#End Region
 
Last edited:
Upvote 0
Top