title: Android & Maps v2: how do I get the users location?
body: <p>I have a lot to do before I am finished, after 8 hours straight working on this I need to ask for help. I have managed to set up V2 maps on Android they work on my device, I do not know where to find a resource that could help me build this up to a more advanced map application, I cannot even get the users location to show. I am debugging on an Android phone which has the internet. I have read more than 10 questions on Stack overflow as well as read through some of the documentation on Google. </p>
  
  <p>Here is my class so far:</p>
  
  <pre><code>import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.SupportMapFragment;
  import com.google.android.gms.maps.model.LatLng;
  import com.google.android.gms.maps.model.MarkerOptions;
  
  import android.location.Location;
  import android.os.Bundle;
  import android.support.v4.app.FragmentActivity;
  import android.view.Menu;
  
  public class MainActivity extends FragmentActivity  {
  
  
    private GoogleMap mMap;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
       setUpMapIfNeeded();
  
  }
  
    @Override
      protected void onResume() {
          super.onResume();
          setUpMapIfNeeded();
      }
  
  
  
    private void setUpMapIfNeeded() {
          // Do a null check to confirm that we have not already instantiated the map.
          if (mMap == null) {
              // Try to obtain the map from the SupportMapFragment.
              mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
                      .getMap();
              // Check if we were successful in obtaining the map.
              if (mMap != null) {
                  setUpMap();
              }
          }
      }
  
  
    private void setUpMap() {
  
        mMap.setMyLocationEnabled(true);
        mMap.getMyLocation();
  
  
  
      }
  }
  </code></pre>
  
  <p>I need to build up to getting the users location, then allowing the user to search for places and store them, does anyone think this would be possible in V2 maps?</p>
  
  <p>Many thanks!</p>