Added method sendLastKnownLocationToTelegram.

This commit is contained in:
Filip Strajnar 2024-10-27 13:28:07 +01:00
parent 44a01332ae
commit c65ead7bad

View file

@ -120,6 +120,12 @@ public class LocationLoggingService extends Service implements LocationListener
return locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
}
public void sendLastKnownLocationToTelegram(){
Location lastKnownLocation = getLastKnownLocation();
this.lastLocation = lastKnownLocation;
sendLocationToTelegram(lastKnownLocation);
}
@Override
public void onDestroy() {
Log.d(TAG, "Service has been destroyed.");