/// and the manufacturer's assigned 24-bit identifier for the radio chipset in the WAP.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public class Fence : IDisposable
{
private bool _disposed = false;
/// Gets the type of geofence.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public FenceType Type
{
get
/// Gets the ID of the place.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int PlaceId
{
get
/// Gets the longitude of geofence.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public double Longitude
{
get
/// Gets the latitude of geofence.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public double Latitude
{
get
/// Gets the radius of geofence.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int Radius
{
get
/// Gets the address of geofence.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public string Address
{
get
/// Gets the BSSID of geofence.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public string Bssid
{
get
/// Gets the SSID of geofence.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public string Ssid
{
get
/// <exception cref="ArgumentException">In case of an invalid parameter.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public static Fence CreateGPSFence(int placeId, double latitude, double longitude, int radius, string address)
{
IntPtr handle = IntPtr.Zero;
/// <exception cref="ArgumentException">In case of an invalid parameter.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public static Fence CreateWifiFence(int placeId, string bssid, string ssid)
{
IntPtr handle = IntPtr.Zero;
/// <exception cref="ArgumentException">In case of an invalid parameter.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public static Fence CreateBTFence(int placeId, string bssid, string ssid)
{
IntPtr handle = IntPtr.Zero;
/// The overloaded Dispose API for destroying the fence handle.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public void Dispose()
{
Dispose(true);
/// Dispose.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
protected virtual void Dispose(bool disposing)
{
if (_disposed)
/// Represents the geofence list item data.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public class FenceData
{
internal FenceData(int fenceId, IntPtr handle, int index, int count)
/// The geofence instance.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public Fence Fence
{
get;
/// The geofence ID.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int GeofenceId
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>The index value starts from 1.</value>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int Index
{
get;
/// The total number of fences that exists for the requester.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int Count
{
get;
/// Represents the place list item data.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public class PlaceData
{
internal PlaceData(int id, string name, int index, int count)
/// The current place ID.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int PlaceId
{
get;
/// The current place name.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public string Name
{
get;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>The index value starts from 1.</value>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int Index
{
get;
/// The total number of places that exists for the requester.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int Count
{
get;
/// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public class FenceStatus : IDisposable
{
private bool _disposed = false;
/// <param name="fenceId">The geofence ID.</param>
/// <exception cref="ArgumentException">In case of an invalid parameter.</exception>
/// <exception cref="NotSupportedException">In case of geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public FenceStatus(int fenceId)
{
IntPtr handle;
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public GeofenceState State
{
get
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int Duration
{
get
/// The overloaded Dispose API for destroying the fence handle.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public void Dispose()
{
Dispose(true);
/// Dispose.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
protected virtual void Dispose(bool disposing)
{
if (_disposed)
* limitations under the License.
*/
+using System;
+
namespace Tizen.Location.Geofence
{
/// <summary>
/// Enumeration for the geofence types.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public enum FenceType
{
/// <summary>
/// Enumeration for the state of geofence.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public enum GeofenceState
{
/// <summary>
/// Enumeration for the geofence management events.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public enum GeofenceEventType
{
/// <summary>
/// Enumeration for the provider of proximity.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public enum ProximityProvider
{
/// <summary>
/// Enumeration for the state of proximity.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public enum ProximityState
{
/// <summary>
/// Enumeration for the types of error occured, if any.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public enum GeofenceError
{
/// <summary>
/// Event arguments are passed when an event is triggered to notify the proximity state change.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public class ProximityStateEventArgs : EventArgs
{
/// <summary>
/// The geofence ID.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int GeofenceId
{
get;
/// The proximity state.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public ProximityState State
{
get;
/// The proximity provider.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public ProximityProvider Provider
{
get;
/// Event arguments are passed when an event is triggered to notify the geofence state change.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public class GeofenceStateEventArgs : EventArgs
{
/// <summary>
/// The specified geofence ID.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int GeofenceId
{
get;
/// The geofence state.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public GeofenceState State
{
get;
/// Event arguments are passed when an event occurs in geofence and the place, such as add, update, etc..
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public class GeofenceResponseEventArgs : EventArgs
{
/// <summary>
/// The place ID.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int PlaceId
{
get;
/// The specified geofence ID.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int FenceId
{
get;
/// The error code for the particular action.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public GeofenceError ErrorCode
{
get;
/// The result code for the particular place and geofence management.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public GeofenceEventType EventType
{
get;
/// </list>
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public class GeofenceManager : IDisposable
{
private bool _disposed = false;
/// <exception cref="OutOfMemoryException">In case of out of memory condition.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public GeofenceManager()
{
IntPtr handle;
/// Checks whether the Geofence manager is available or not.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public static bool IsSupported
{
get
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public void Start(int geofenceId)
{
GeofenceError ret = (GeofenceError)Interop.GeofenceManager.Start(Handle, geofenceId);
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public void Stop(int geofenceId)
{
GeofenceError ret = (GeofenceError)Interop.GeofenceManager.Stop(Handle, geofenceId);
/// Call to Start() will invoke this event.
/// </remarks>
/// <exception cref="NotSupportedException">In case the feature is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public event EventHandler<GeofenceStateEventArgs> StateChanged
{
add
/// Call to Start() will invoke this event.
/// </remarks>
/// <exception cref="NotSupportedException">In case the feature is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public event EventHandler<ProximityStateEventArgs> ProximityChanged
{
add
/// The value of place_id or geofence_id is -1 when the place ID or geofence ID is not assigned.
/// </remarks>
/// <exception cref="NotSupportedException">In case the feature is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public event EventHandler<GeofenceResponseEventArgs> GeofenceEventChanged
{
add
/// The overloaded Dispose API for destroying the GeofenceManager handle.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public void Dispose()
{
Dispose(true);
/// Dispose.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
protected virtual void Dispose(bool disposing)
{
if (_disposed)
/// A user can manage all the geofence or place related data and events.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public class VirtualPerimeter
{
private IntPtr Handle;
/// <since_tizen> 3 </since_tizen>
/// <param name="manager">The GeofenceManager instance.</param>
/// <exception cref="ArgumentException"> In case of an invalid parameter.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public VirtualPerimeter(GeofenceManager manager)
{
if (manager == null)
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int AddPlaceName(string name)
{
int placeId = 0;
/// <exception cref="InvalidOperationException">In case of any System error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public void UpdatePlace(int placeId, string name)
{
GeofenceError ret = (GeofenceError)Interop.VirtualPerimeter.UpdatePlace(Handle, placeId, name);
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public void RemovePlace(int placeId)
{
GeofenceError ret = (GeofenceError)Interop.VirtualPerimeter.RemovePlace(Handle, placeId);
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public int AddGeofence(Fence fence)
{
int fenceId = 0;
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public void RemoveGeofence(int fenceId)
{
GeofenceError ret = (GeofenceError)Interop.VirtualPerimeter.RemoveFence(Handle, fenceId);
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public string GetPlaceName(int placeId)
{
string name = "";
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public IEnumerable<PlaceData> GetPlaceDataList()
{
List<PlaceData> places = new List<PlaceData>();
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public IEnumerable<FenceData> GetFenceDataList()
{
List<FenceData> fences = new List<FenceData>();
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="UnauthorizedAccessException">In case privileges are not defined.</exception>
/// <exception cref="NotSupportedException">In case the geofence is not supported.</exception>
+ [Obsolete("Deprecated since API11. Might be removed in API13")]
public IEnumerable<FenceData> GetGeofenceDataListByPlaceId(int placeId)
{
List<FenceData> fences = new List<FenceData>();
remarks: *content
---
## Overview
+
+> [!NOTE]
+> All Geofence APIs have been deprecated since Tizen 8.0 (API Level 11) which means they are planned to be removed after two releases.
+
This API provides functions to set the gofence with a geopoint, MAC address of Wi-Fi, and Bluetooth address.
Also, notifications on events like changing in service status are provided.