title: ways of getting my location on android
body: <p>This may be a kinda odd question but I am new at Android development and I'm having trouble to learn how to retrieve the user's location to my application. I have looked for this topic but I just can't find a statisfying answer.</p>
  
  <p>To get the user location I have found two ways:</p>
  
  <ol>
  <li><p><a href="http://developer.android.com/training/location/retrieve-current.html" rel="nofollow">http://developer.android.com/training/location/retrieve-current.html</a> . This one is using what I think is the new Google Services release which uses a LocationClient to connect to Google Services and retrieve the location.</p></li>
  <li><p><a href="http://developer.android.com/guide/topics/location/strategies.html" rel="nofollow">http://developer.android.com/guide/topics/location/strategies.html</a> . The other one is using the android.location class and a LocationManager to retrieve the location.</p></li>
  </ol>
  
  <p>The thing is that I don't get the difference between using one way or the other, which one is better??</p>
  
  <p>And another question is that in the second way you can specify which location provider you want to use, if the GPS provider or the Network provider and in the first one you can't, but in the first paragraph it says that it uses the location sensors that are currently active for the device. Does this mean that I don't have to worry about choosing between both services??</p>
  
  <p>I am using Android Studio and I have set up the new Google Services release, I just need to know the pros and cons between both ways to know which one to use and to begin learning.</p>
  
  <p>Thanks!!</p>