title: Unable to update current location FusedLocationClient
body: <p>I am using fused location provider for fetching current location and update my marker to my current location via that. I am giving app permission and then it does nothing after that. Though i have written code for that to fetch and update location on map. I have previously given Access_COARSE_LOCATION as well, but nothing changes. this is my code :-</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity implements OnMapReadyCallback {
  
      private GoogleMap mMap;
      private FusedLocationProviderClient mFusedLocationClient;
  
      private static final int LOCATION_PERMISSION_REQUEST_CODE = 537;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          init();
      }
  
      private void init() {
      //    Initializing Objects...
          mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);
          SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                  .findFragmentById(R.id.map);
          if (mapFragment != null) {
              mapFragment.getMapAsync(this);
          }
      }
  
      @Override
      public void onMapReady(GoogleMap googleMap) {
      // onMapReady check Permission and load map...
      // If Permission not granted ask for permission...
          if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
                  == PackageManager.PERMISSION_GRANTED) {
              mMap = googleMap;
              MoveCameraToCurrentPosition();
          } else {
              AskUserPermission();
          }
      }
  
  
      public void AskUserPermission() {
          //   Show Explanation and show permission dialog...
          //   Permission is not granted
          //   Show Explanation...
  
          //   shouldShowRequestPermissionRationale returns true if permission has previously
          //   denied by user..
  
          if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)) {
              // Show an explanation to the user *asynchronously* -- don't block
              // this thread waiting for the user's response! After the user
              // sees the explanation, try again to request the permission.
              final AlertDialog.Builder builder = new AlertDialog.Builder(this);
              builder.setTitle("Why we need Location Permission?");
              builder.setMessage("we want to forecast the weather alert like storms, Flood," +
                      "Hurricanes, etc. to you before hand based on your farm location, so that " +
                      "we can save your crops :).");
              builder.setNeutralButton("Got it.", new DialogInterface.OnClickListener() {
                  @Override
                  public void onClick(DialogInterface dialogInterface, int i) {
                      dialogInterface.dismiss();
                      RequestLocationPermission();
                  }
              });
              builder.show();
              RequestLocationPermission();
          } else {
              //  No Explanation Needed Request Permission...
              RequestLocationPermission();
          }
      }
  
      // Show Alert Dialog for permission...
      private void RequestLocationPermission() {
          // No explanation needed; request the permission
          ActivityCompat.requestPermissions(this, new String[]{Manifest.permission
                  .ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION},
                  LOCATION_PERMISSION_REQUEST_CODE);
      }
  
      // Fetch Request Permission result and update current location...
      @Override
      public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
          super.onRequestPermissionsResult(requestCode, permissions, grantResults);
          switch (requestCode) {
              case LOCATION_PERMISSION_REQUEST_CODE:
                  if (grantResults.length &gt; 0
                          &amp;&amp; grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                      // This code is not executing even after giving permission..
                      MoveCameraToCurrentPosition();
                  }
                  break;
          }
  
      }
      // Move camera to current location...
      private void MoveCameraToCurrentPosition(){
          if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
                  == PackageManager.PERMISSION_GRANTED) {
              mFusedLocationClient.getLastLocation()
                      .addOnSuccessListener(this, new OnSuccessListener&lt;Location&gt;() {
                          @Override
                          public void onSuccess(Location location) {
                              // Got last known location. In some rare situations this can be null.
                              if (location != null) {
                                  // Add a marker in Sydney, Australia, and move the camera.
                                  LatLng sydney = new LatLng(location.getLatitude(), location.getLongitude());
                                  mMap.addMarker(new MarkerOptions().position(sydney).icon(BitmapDescriptorFactory.fromResource(R.drawable.barley)).title("Your Location"));
                                  CameraPosition cameraPosition = new CameraPosition(sydney, 10, 0, 0);
                                  CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);
                                  mMap.animateCamera(cameraUpdate);
                              }
                          }
                      });
          } else {
              AskUserPermission();
          }
      }
  }
  </code></pre>