title: Mapbox get current location, Android
body: <p>I am trying to get the current location of the user using Mapbox SDK for Android. After reviewing the tutorials and everything else out there available i concluded that all of the techniques that are shown include deprecated methods.</p>
  
  <p>I tried to use the following technique since may be is my only shot but i run to an error which i cannot solve: <code>error: cannot access LocationListener
  class file for com.google.android.gms.location.LocationListener not found</code>.</p>
  
  <p>Here is part of my code that is producing the error:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      context = this;
      super.onCreate(savedInstanceState);
      Mapbox.getInstance(this, API_KEY);
  
      setContentView(R.layout.activity_map_view_test);
  
  
      locationEngine = GoogleLocationEngine.getLocationEngine(context);
  
      myLocation = locationEngine.getLastLocation();
  
  
      mapView = (MapView) findViewById(R.id.mapView);
      mapView.onCreate(savedInstanceState);
      mapView.getMapAsync(new OnMapReadyCallback() {
  
          @Override
          public void onMapReady(final MapboxMap mapboxMap) {
              mapboxMap.addMarker(new MarkerOptions()
                      .position(new LatLng(myLocation.getLatitude(),myLocation.getLongitude()))
                      .title("My Location")
                      .snippet("Illinois")
              );
  
              mapboxMap.setLatLng(mapboxMap.getMarkers().get(0).getPosition());
          }
      });
  }
  </code></pre>
  
  <p>Does anyone have some bright ideas? Any help is apreciated.</p>
  
  <p>Best regards,</p>
  
  <p>Dimitar Georgiev</p>