How to run my android apps coninue in background after installation?

I want to get Latitude and Longitude of geographical location and send to save in mysql server. This will continue by user mobile.

please send me code/tips.