title: OnLocationChange send coordinates to Firebase
body: <p>I am making a Capstone Project i badly need help got stuck on this for a few days now , i want to send an location updates to Firebase when the user Clicks on a button. Updates are set to send every 3 seconds on location change . But the problem is it only sends coordinates once the button is pressed and not continuously sends updates on location change. Here is my Code</p>
  
  <pre><code>Start = (Button) findViewById(R.id.btnLoc);
  Stop = (Button) findViewById(R.id.btnStopSend);
  
      mRef = new Firebase ("FIREBASE URL");
  
      Start.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
          listener = new LocationListener() {
              @Override
              public void onLocationChanged(Location location) {
  
                  Firebase busCoords = mRef.child("Location");
                  busCoords.setValue(location.getLatitude()+ ",   "+location.getLongitude());
              }
  
              @Override
              public void onStatusChanged(String s, int i, Bundle bundle) {
              }
  
              @Override
              public void onProviderEnabled(String s) {
              }
  
              @Override
              public void onProviderDisabled(String s) {
              }
          };
  
              locationManager = (LocationManager) getApplicationContext().getSystemService(Context.LOCATION_SERVICE);
  
              //noinspection MissingPermission
              locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,3000,1000,listener);
          }
      });
  
      Stop.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              if(locationManager != null){
                  //noinspection MissingPermission
                  locationManager.removeUpdates(listener);
              }
  
          }
      });
  
  }
  </code></pre>