title: GPS Service in Android
body: <p>I have a question about services in Android. I want to know what's the best approach to get the Location variables from GPS. I am doing an application with geolocation using a service wich implements the GPS module. And for getting the location I create a variable in the class static and public method static to be called from outside the class, and that is it. To retrieve the position from the GPS I just used in my classes:</p>
  
  <p>Location mLocation = ServiceGPS.getLocation();
  The class ServiceGPS has this method:</p>
  
  <p>public static Location getLocation(){
      return mLocation;
  }</p>
  
  <p>I dont really see the point of binding to a service in this case, as I just have to call the static method. I also was thinking of doing a base class or implements the LocationListener, but this way is really simple and it works and saves code writting.</p>
  
  <p>Thanks a lot for your help, and sharing your knowledge with me.</p>
  
  <p>BR. David.</p>