You, can simply create a background service then implements a location listener. In that location listener, you can set the time interval in the requestLocationUpdate method to ping the GPS at particular time intervals. or you can use timertask to send gps at particular intervals
Here is a location manager instance:
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, timeinterval2, 0, locationListener);
You can send that location to the server from the service. You can also send notifications to launch the app.