title: Get GPS location via a service in Android
body: <p>I need to monitor user's locations using a background service, and then load them and show the path to the user.</p>
  
  <p>Using an activity, it was quite easy to get GPS locations, but when I got to do it via a service, I came into a problem as it seems to only work for looper threads (or something like that).</p>
  
  <p>As I've searched the internet for a solution, I've found out that many people got the same problem, but I couldn't find a working solution. Some people say that you need to use prepare->loop->quit , and some say you have to use a handlerThread, but still, I can't find out how to do such things in a proper way.</p>