Package com.geouniq.android
Class GeoUniq.GeoFence.Builder
java.lang.Object
com.geouniq.android.GeoUniq.GeoFence.Builder
- Enclosing class:
- GeoUniq.GeoFence
Builder class to obtain
GeoUniq.GeoFence objects-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates aGeoUniq.GeoFencewith the parameters supplied to thisBuilder.
Calling this method does not set theGeoFenceto be monitored.setArea(GeoUniq.CircularArea area) Sets the area to be monitoredsetCallbackClass(Class<? extends GeoUniq.GeoFenceListener> callbackClass) Sets the callback class that will receive updates when the status of theGeoFencechangessetExpirationDate(Date expirationDate) Sets the expiration date for theGeoFence.
TheGeoFencewill no longer be monitored and will be automatically deleted after this date.
If not set, theGeoFencenever expires.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setArea
Sets the area to be monitored- Parameters:
area- TheGeoUniq.CircularAreato be monitored- Returns:
- This
Builderobject to allow for chaining of calls to set methods
-
setCallbackClass
public GeoUniq.GeoFence.Builder setCallbackClass(Class<? extends GeoUniq.GeoFenceListener> callbackClass) Sets the callback class that will receive updates when the status of theGeoFencechanges- Parameters:
callbackClass- A class implementingGeoUniq.GeoFenceListenerinterface- Returns:
- This
Builderobject to allow for chaining of calls to set methods - See Also:
-
setExpirationDate
Sets the expiration date for theGeoFence.
TheGeoFencewill no longer be monitored and will be automatically deleted after this date.
If not set, theGeoFencenever expires.- Parameters:
expirationDate- ADatecorresponding to the desired expiration date- Returns:
- This
Builderobject to allow for chaining of calls to set methods
-
create
Creates aGeoUniq.GeoFencewith the parameters supplied to thisBuilder.
Calling this method does not set theGeoFenceto be monitored.GeoUniq.setGeoFence(GeoFence)must be called to start monitoring the returnedGeoFence.- Returns:
- A new geofence
-