It's a small project consist of one activity and one service. In the service part, I have included code which gets the location from GPS after interval time.The activity part, I have made a button which gets the location from the service. In this project, I have used bind service so the whole code is about how to create bind service then how to start and stop from activity and how to access method and attribute from the service in activity.
It's simple code and easy to understand If you still have an issue you can email me.