Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.gps;
- import android.location.Location;
- import android.location.LocationListener;
- import android.os.Bundle;
- import androidx.annotation.NonNull;
- import java.util.List;
- public class MyLocListener implements LocationListener {
- private LocListenerInterface LocListenerInterface;
- @Override
- public void onLocationChanged(@NonNull Location location) {
- LocListenerInterface.OnLocationChanged(location);
- }
- @Override
- public void onLocationChanged(@NonNull List<Location> locations) {
- LocationListener.super.onLocationChanged(locations);
- }
- @Override
- public void onFlushComplete(int requestCode) {
- LocationListener.super.onFlushComplete(requestCode);
- }
- @Override
- public void onStatusChanged(String provider, int status, Bundle extras) {
- LocationListener.super.onStatusChanged(provider, status, extras);
- }
- @Override
- public void onProviderEnabled(@NonNull String provider) {
- LocationListener.super.onProviderEnabled(provider);
- }
- @Override
- public void onProviderDisabled(@NonNull String provider) {
- LocationListener.super.onProviderDisabled(provider);
- }
- public void setLocListenerInterface(com.example.gps.LocListenerInterface locListenerInterface) {
- LocListenerInterface = locListenerInterface;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement