Class Fence
Definition
- Assembly:
- Tizen.Location.Geofence.dll
Geofence defines a virtual perimeter for a real-world geographic area. If you create a geofence, you can trigger some activities when a device enters (or exits) the geofences defined by you. You can create a geofence with the information of the Geopoint, Wi-Fi, or BT.
- Geopoint: Geofence is specified by the coordinates (Latitude and Longitude) and radius.
- WIFI: Geofence is specified by the BSSID of the Wi-Fi access point.
- BT: Geofence is specified by the Bluetooth address.
[Obsolete("Deprecated since API11. Might be removed in API13")]
public class Fence : IDisposable
- Inheritance
-
objectFence
- Implements
-
System.IDisposable
Properties
View SourceAddress
Gets the address of geofence.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public string Address { get; }
Property Value
Type | Description |
---|---|
string |
Bssid
Gets the BSSID of geofence.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public string Bssid { get; }
Property Value
Type | Description |
---|---|
string |
Latitude
Gets the latitude of geofence.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public double Latitude { get; }
Property Value
Type | Description |
---|---|
double |
Longitude
Gets the longitude of geofence.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public double Longitude { get; }
Property Value
Type | Description |
---|---|
double |
PlaceId
Gets the ID of the place.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public int PlaceId { get; }
Property Value
Type | Description |
---|---|
int |
Radius
Gets the radius of geofence.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public int Radius { get; }
Property Value
Type | Description |
---|---|
int |
Ssid
Gets the SSID of geofence.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public string Ssid { get; }
Property Value
Type | Description |
---|---|
string |
Type
Gets the type of geofence.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public FenceType Type { get; }
Property Value
Type | Description |
---|---|
FenceType |
Methods
View SourceCreateBTFence(int, string, string)
Creates a Bluetooth type of the new geofence.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public static Fence CreateBTFence(int placeId, string bssid, string ssid)
Parameters
Type | Name | Description |
---|---|---|
int | placeId | The current place ID. |
string | bssid | Specifies the value of BSSID of BT MAC address. |
string | ssid | Specifies the value of SSID of BT Device. |
Returns
Type | Description |
---|---|
Fence | The newly created geofence instance. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | In case of an invalid parameter. |
System.InvalidOperationException | In case of any system error. |
System.NotSupportedException | In case the geofence is not supported. |
CreateGPSFence(int, double, double, int, string)
Creates a geopoint type of the new geofence.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public static Fence CreateGPSFence(int placeId, double latitude, double longitude, int radius, string address)
Parameters
Type | Name | Description |
---|---|---|
int | placeId | The current place ID. |
double | latitude | Specifies the value of latitude of the geofence [-90.0 ~ 90.0] (degrees). |
double | longitude | Specifies the value of longitude of the geofence [-180.0 ~ 180.0] (degrees). |
int | radius | Specifies the value of radius of the geofence [100 ~ 500] (meter). |
string | address | Specifies the value of the address. |
Returns
Type | Description |
---|---|
Fence | The newly created geofence instance. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | In case of an invalid parameter. |
System.InvalidOperationException | In case of any system error. |
System.NotSupportedException | In case the geofence is not supported. |
CreateWifiFence(int, string, string)
Creates a Wi-Fi type of the new geofence.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public static Fence CreateWifiFence(int placeId, string bssid, string ssid)
Parameters
Type | Name | Description |
---|---|---|
int | placeId | The current place ID. |
string | bssid | Specifies the value of BSSID of the Wi-Fi MAC address. |
string | ssid | Specifies the value of SSID of the Wi-Fi device. |
Returns
Type | Description |
---|---|
Fence | The newly created geofence instance. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | In case of an invalid parameter. |
System.InvalidOperationException | In case of any system error. |
System.NotSupportedException | In case the geofence is not supported. |
Dispose()
The overloaded Dispose API for destroying the fence handle.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
public void Dispose()
Dispose(bool)
Dispose.
Declaration
[Obsolete("Deprecated since API11. Might be removed in API13")]
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
~Fence()
The destructor of the Fence class.
Declaration
protected ~Fence()