# Class GeofenceManager.Listener

java.lang.Object
com.codename1.location.GeofenceManager.Listener

All Implemented Interfaces:
  `GeofenceListener, LocationListener`

Enclosing class:
  `GeofenceManager`

public static class GeofenceManager.Listener extends Object implements GeofenceListener, LocationListener

The Listener class that is registered to receive Geofence events. This is used internally by `GeofenceManager`. It is only public because `GeofenceListener` classes must be public.

##### Deprecated

For internal use only.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Listener()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `locationUpdated(Location location)`
  This method is been called by the system when Location is being updated
  `void`
  `onEntered(String id)`
  This callback gets called once the device enters the Geofence area
  `void`
  `onExit(String id)`
  This callback gets called once the device is out of the Geofence area
  `void`
  `providerStateChanged(int newState)`
  This method is been called by the system when the provider state has being Changed

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Listener

    public Listener()

- ## Method Details

  - ### onExit

    public void onExit(String id)
    Description copied from interface: `GeofenceListener`
    This callback gets called once the device is out of the Geofence area
    Specified by:
      `onExit` in interface `GeofenceListener`

  - ### onEntered

    public void onEntered(String id)
    Description copied from interface: `GeofenceListener`
    This callback gets called once the device enters the Geofence area
    Specified by:
      `onEntered` in interface `GeofenceListener`

  - ### locationUpdated

    public void locationUpdated(Location location)
    Description copied from interface: `LocationListener`

    This method is been called by the system when Location is being updated

    ###### Parameters

    - `location`: a Location Object
    Specified by:
      `locationUpdated` in interface `LocationListener`

  - ### providerStateChanged

    public void providerStateChanged(int newState)
    Description copied from interface: `LocationListener`

    This method is been called by the system when the provider state has being Changed

    ###### Parameters

    - `newState`: @param newState a new state one of the following: LocationManager.AVAILABLE, LocationManager.OUT_OF_SERVICE or LocationManager.TEMPORARILY_UNAVAILABLE
    Specified by:
      `providerStateChanged` in interface `LocationListener`