Show / Hide Table of Contents

    Class GeofenceManager

    Definition

    Namespace:
    Tizen.Location.Geofence
    Assembly:
    Tizen.Location.Geofence.dll
    API Level:
    3

    The Geofence Manager API provides service related to geofence (geo-fence). Geofence is a virtual perimeter for a real-world geographic area. This API provides functions to set geofence with a geopoint, MAC address of Wi-Fi, and Bluetooth address. Also, notifications on events like changing in service status are provided. There are two kinds of places and fences:

    • Public places and fences are created by the MyPlace application that can be used by all applications.
    • Private places and fences are created by the specified application that can be used by the same application.
    Notifications can be received about the following events:
    • Zone in when a device enters a specific area.
    • Zone out when a device exits a specific area.
    • Results and errors for each event requested to the geofence module.

    public class GeofenceManager : IDisposable
    Inheritance
    Object
    GeofenceManager
    Implements
    IDisposable

    Constructors

    View Source

    GeofenceManager()

    Creates a new Geofence manager.

    Declaration
    public GeofenceManager()
    Exceptions
    Type Condition
    OutOfMemoryException

    In case of out of memory condition.

    InvalidOperationException

    In case of any system error.

    NotSupportedException

    In case the geofence is not supported.

    API Level: 3

    Properties

    View Source

    IsSupported

    Checks whether the Geofence manager is available or not.

    Declaration
    public static bool IsSupported { get; }
    Property Value
    Type Description
    Boolean
    API Level: 3

    Methods

    View Source

    Dispose()

    The overloaded Dispose API for destroying the GeofenceManager handle.

    Declaration
    public void Dispose()
    API Level: 3
    View Source

    Dispose(Boolean)

    Dispose.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing
    API Level: 3
    View Source

    Finalize()

    The destructor of the GeofenceManager class.

    Declaration
    protected void Finalize()
    API Level: 3
    View Source

    Start(Int32)

    Starts the geofencing service.

    Declaration
    public void Start(int geofenceId)
    Parameters
    Type Name Description
    Int32 geofenceId

    The specified geofence ID.

    Remarks

    When the location service is enabled, the StateChanged event is invoked and the service starts.

    Exceptions
    Type Condition
    ArgumentException

    In case of an invalid parameter.

    InvalidOperationException

    In case of any system error.

    UnauthorizedAccessException

    In case privileges are not defined.

    NotSupportedException

    In case the geofence is not supported.

    API Level: 3
    Privilege Level: public
    Privilege: http://tizen.org/privilege/location
    View Source

    Stop(Int32)

    Stops the geofenceing service.

    Declaration
    public void Stop(int geofenceId)
    Parameters
    Type Name Description
    Int32 geofenceId

    The specified geofence ID.

    Remarks

    This function initiates the process of stopping the service. You can stop and start the Geofence manager as needed.

    Exceptions
    Type Condition
    ArgumentException

    In case of an invalid parameter.

    InvalidOperationException

    In case of any system error.

    UnauthorizedAccessException

    In case privileges are not defined.

    NotSupportedException

    In case the geofence is not supported.

    API Level: 3
    Privilege Level: public
    Privilege: http://tizen.org/privilege/location

    Events

    View Source

    GeofenceEventChanged

    Called when some event occurs in the geofence and the place, such as add, update, etc.. The events of public geofence is also received if there are public geofences.

    Declaration
    public event EventHandler<GeofenceResponseEventArgs> GeofenceEventChanged
    Event Type
    Type Description
    EventHandler<GeofenceResponseEventArgs>
    Remarks

    Call to Start() will invoke this event. The value of place_id or geofence_id is -1 when the place ID or geofence ID is not assigned.

    Exceptions
    Type Condition
    NotSupportedException

    In case the feature is not supported.

    API Level: 3
    View Source

    ProximityChanged

    Called when the proximity state of a device is changed.

    Declaration
    public event EventHandler<ProximityStateEventArgs> ProximityChanged
    Event Type
    Type Description
    EventHandler<ProximityStateEventArgs>
    Remarks

    Call to Start() will invoke this event.

    Exceptions
    Type Condition
    NotSupportedException

    In case the feature is not supported.

    API Level: 3
    View Source

    StateChanged

    Invokes when a device enters or exits the given geofence if this event is registered.

    Declaration
    public event EventHandler<GeofenceStateEventArgs> StateChanged
    Event Type
    Type Description
    EventHandler<GeofenceStateEventArgs>
    Remarks

    Call to Start() will invoke this event.

    Exceptions
    Type Condition
    NotSupportedException

    In case the feature is not supported.

    API Level: 3

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2022 Samsung
    Generated by DocFX