Advertisement
RuslanK

MyLocListener

Aug 16th, 2022
724
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.37 KB | None | 0 0
  1. package com.example.gps;
  2.  
  3. import android.location.Location;
  4. import android.location.LocationListener;
  5. import android.os.Bundle;
  6.  
  7. import androidx.annotation.NonNull;
  8.  
  9. import java.util.List;
  10.  
  11. public class MyLocListener implements LocationListener {
  12.     private LocListenerInterface LocListenerInterface;
  13.     @Override
  14.     public void onLocationChanged(@NonNull Location location) {
  15.         LocListenerInterface.OnLocationChanged(location);
  16.     }
  17.  
  18.     @Override
  19.     public void onLocationChanged(@NonNull List<Location> locations) {
  20.         LocationListener.super.onLocationChanged(locations);
  21.     }
  22.  
  23.     @Override
  24.     public void onFlushComplete(int requestCode) {
  25.         LocationListener.super.onFlushComplete(requestCode);
  26.     }
  27.  
  28.     @Override
  29.     public void onStatusChanged(String provider, int status, Bundle extras) {
  30.         LocationListener.super.onStatusChanged(provider, status, extras);
  31.     }
  32.  
  33.     @Override
  34.     public void onProviderEnabled(@NonNull String provider) {
  35.         LocationListener.super.onProviderEnabled(provider);
  36.     }
  37.  
  38.     @Override
  39.     public void onProviderDisabled(@NonNull String provider) {
  40.         LocationListener.super.onProviderDisabled(provider);
  41.     }
  42.  
  43.     public void setLocListenerInterface(com.example.gps.LocListenerInterface locListenerInterface) {
  44.         LocListenerInterface = locListenerInterface;
  45.     }
  46. }
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement