{
"dependencies": {
- "Tizen": "1.0.1"
+ "Tizen": "1.0.1",
+ "Tizen.System": "1.0.2"
},
"frameworks": {
"net45": {}
"runtimes": {
"win": {}
}
-}
+}
\ No newline at end of file
{
"dependencies": {
"NETStandard.Library": "1.6.0",
- "Tizen": "1.0.1"
+ "Tizen": "1.0.1",
+ "Tizen.System": "1.0.2"
},
"frameworks": {
"netstandard1.3": {}
/// /// </summary>
public class Accelerometer : Sensor
{
+ private static string AccelerometerKey = "http://tizen.org/feature/sensor.accelerometer";
/// <summary>
/// Gets the X component of the acceleration.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the Accelerometer sensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.Accelerometer, AccelerometerKey);
}
}
public event EventHandler<AccelerometerDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.Accelerometer, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if accelerometer sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// </summary>
public class FaceDownGestureDetector : Sensor
{
+ private static string GestureDetectorKey = "http://tizen.org/feature/sensor.gesture_recognition";
+
/// <summary>
/// Gets the state of the face down gesture.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the face down gesture detector is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.FaceDownGestureDetector, GestureDetectorKey);
}
}
return SensorType.FaceDownGestureDetector;
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.FaceDownGestureDetector, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if face down gesture detector is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class GravitySensor : Sensor
{
+ private const string GravitySensorKey = "http://tizen.org/feature/sensor.gravity";
+
private event EventHandler<SensorAccuracyChangedEventArgs> _accuracyChanged;
/// <summary>
/// Gets the X component of the gravity.
get
{
Log.Info(Globals.LogTag, "Checking if the GravitySensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.GravitySensor, GravitySensorKey);
}
}
}
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.GravitySensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if gravity sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class Gyroscope : Sensor
{
+ private const string GyroscopeKey = "http://tizen.org/feature/sensor.gyroscope";
+
/// <summary>
/// Gets the X component of the acceleration.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the Gyroscope sensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.Gyroscope, GyroscopeKey);
}
}
public event EventHandler<GyroscopeDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.Gyroscope, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if gyroscope sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class GyroscopeRotationVectorSensor : Sensor
{
+ private const string GyroscopeRVKey = "http://tizen.org/feature/sensor.gyroscope_rotation_vector";
+
/// <summary>
/// Gets the X component of the gyroscope rotation vector.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the GyroscopeRotationVectorSensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.GyroscopeRotationVectorSensor, GyroscopeRVKey);
}
}
public event EventHandler<GyroscopeRotationVectorSensorDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.GyroscopeRotationVectorSensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if gyroscope rotation vector sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class HeartRateMonitor : Sensor
{
+ private const string HRMKey = "http://tizen.org/feature/sensor.heart_rate_monitor";
+
/// <summary>
/// Gets the value of the heart rate monitor.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the HeartRateMonitor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.HeartRateMonitor, HRMKey);
}
}
public event EventHandler<HeartRateMonitorDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.HeartRateMonitor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if heart rate monitor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class HumiditySensor : Sensor
{
+ private const string HumiditySensorKey = "http://tizen.org/feature/sensor.humidity";
+
/// <summary>
/// Gets the value of the humidity sensor.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the HumiditySensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.HumiditySensor, HumiditySensorKey);
}
}
public event EventHandler<HumiditySensorDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.HumiditySensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if humidity sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// </summary>
public class InVehicleActivityDetector : ActivityDetector
{
+ private const string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition";
+
/// <summary>
/// Gets the state of in-vehicle activity detector
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the in-vehicle activity detector is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.InVehicleActivityDetector, ActivityDetectorKey);
}
}
Log.Info(Globals.LogTag, "Creating in-vehicle activity detector object");
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.InVehicleActivityDetector, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if in-vehicle activity detector is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class LightSensor : Sensor
{
+ private const string LightSensorKey = "http://tizen.org/feature/sensor.photometer";
+
/// <summary>
/// Gets the Level of the light.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the LightSensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.LightSensor, LightSensorKey);
}
}
public event EventHandler<LightSensorDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.LightSensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if light sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class LinearAccelerationSensor : Sensor
{
+ private const string LinearAccelerationSensorKey = "http://tizen.org/feature/sensor.linear_acceleration";
+
private event EventHandler<SensorAccuracyChangedEventArgs> _accuracyChanged;
/// <summary>
/// Gets the X component of the linear acceleration.
get
{
Log.Info(Globals.LogTag, "Checking if the LinearAccelerationSensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.LinearAccelerationSensor, LinearAccelerationSensorKey);
}
}
}
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.LinearAccelerationSensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if linear acceleration sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class Magnetometer : Sensor
{
+ private static string MagnetometerKey = "http://tizen.org/feature/sensor.magnetometer";
+
private event EventHandler<SensorAccuracyChangedEventArgs> _accuracyChanged;
/// <summary>
/// Gets the X component of the magnetometer.
get
{
Log.Info(Globals.LogTag, "Checking if the Magnetometer is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.Magnetometer, MagnetometerKey);
}
}
}
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.Magnetometer, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if magnetometer is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class MagnetometerRotationVectorSensor : Sensor
{
+ private static string MagnetometerRVKey = "http://tizen.org/feature/sensor.geomagnetic_rotation_vector";
+
private event EventHandler<SensorAccuracyChangedEventArgs> _accuracyChanged;
/// <summary>
/// Gets the X component of the magnetometer rotation vector.
get
{
Log.Info(Globals.LogTag, "Checking if the MagnetometerRotationVectorSensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.MagnetometerRotationVectorSensor, MagnetometerRVKey);
}
}
/// /// </summary>
public class OrientationSensor : Sensor
{
+ private static string OrientationSensorKey = "http://tizen.org/feature/sensor.tiltmeter";
+
private event EventHandler<SensorAccuracyChangedEventArgs> _accuracyChanged;
/// <summary>
/// Gets the Azimuth component of the orientation.
get
{
Log.Info(Globals.LogTag, "Checking if the OrientationSensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.OrientationSensor, OrientationSensorKey);
}
}
}
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.OrientationSensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if orientation sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class Pedometer : Sensor
{
+ private static string PedometerKey = "http://tizen.org/feature/sensor.pedometer";
+
/// <summary>
/// Gets the step count
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the Pedometer sensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.Pedometer, PedometerKey);
}
}
public event EventHandler<PedometerDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.Pedometer, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if pedometer sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// </summary>
public class PickUpGestureDetector : Sensor
{
+ private static string GestureDetectorKey = "http://tizen.org/feature/sensor.gesture_recognition";
+
/// <summary>
/// Gets the state of the pick up gesture.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the pick up gesture detector is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.PickUpGestureDetector, GestureDetectorKey);
}
}
/// /// </summary>
public class PressureSensor : Sensor
{
+ private static string PressureSensorKey = "http://tizen.org/feature/sensor.barometer";
+
/// <summary>
/// Gets the value of the pressure sensor.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the PressureSensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.PressureSensor, PressureSensorKey);
}
}
public event EventHandler<PressureSensorDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.PressureSensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if pressure sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
private static int GetCount()
{
/// /// </summary>
public class ProximitySensor : Sensor
{
+ private static string ProximitySensorKey = "http://tizen.org/feature/sensor.proximity";
+
/// <summary>
/// Gets the proximity state.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the ProximitySensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.ProximitySensor, ProximitySensorKey);
}
}
public event EventHandler<ProximitySensorDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.ProximitySensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if proximity sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class RotationVectorSensor : Sensor
{
+ private static string RotationVectorKey = "http://tizen.org/feature/sensor.rotation_vector";
+
private event EventHandler<SensorAccuracyChangedEventArgs> _accuracyChanged;
/// <summary>
/// Gets the X component of the rotation vector.
get
{
Log.Info(Globals.LogTag, "Checking if the RotationVectorSensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.RotationVectorSensor, RotationVectorKey);
}
}
}
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.RotationVectorSensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if rotation vector sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// </summary>
public class RunningActivityDetector : ActivityDetector
{
+ private static string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition";
+
/// <summary>
/// Gets the state of running activity detector
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the running activity detector is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.RunningActivityDetector, ActivityDetectorKey);
}
}
Log.Info(Globals.LogTag, "Creating running activity detector object");
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.RunningActivityDetector, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if running activity detector is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class SleepMonitor : Sensor
{
+ private static string SleepMonitorKey = "http://tizen.org/feature/sensor.sleep_monitor";
+
/// <summary>
/// Gets the value of the sleep state.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the SleepMonitor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.SleepMonitor, SleepMonitorKey);
}
}
public event EventHandler<SleepMonitorDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.SleepMonitor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if sleep monitor is supported");
- isSupported = false;
- }
- return isSupported;
- }
private static int GetCount()
{
/// </summary>
public class StationaryActivityDetector : ActivityDetector
{
+ private static string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition";
+
/// <summary>
/// Gets the state of stationary activity detector
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the stationary activity detector is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.StationaryActivityDetector, ActivityDetectorKey);
}
}
Log.Info(Globals.LogTag, "Creating stationary activity detector object");
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.StationaryActivityDetector, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if stationary activity detector is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class TemperatureSensor : Sensor
{
+ private static string TemperatureSensorKey = "http://tizen.org/feature/sensor.temperature";
+
/// <summary>
/// Gets the value of the temperature sensor.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the TemperatureSensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.TemperatureSensor, TemperatureSensorKey);
}
}
public event EventHandler<TemperatureSensorDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.TemperatureSensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if temperature sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
private static int GetCount()
{
/// /// </summary>
public class UltravioletSensor : Sensor
{
+ private static string UltravioletSensorKey = "http://tizen.org/feature/sensor.ultraviolet";
+
/// <summary>
/// Gets the value of the ultraviolet sensor.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the UltravioletSensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.UltravioletSensor, UltravioletSensorKey);
}
}
public event EventHandler<UltravioletSensorDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.UltravioletSensor, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if ultraviolet sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
private static int GetCount()
{
/// /// </summary>
public class UncalibratedGyroscope : Sensor
{
+ private static string UncalibratedGyroscopeKey = "http://tizen.org/feature/sensor.gyroscope.uncalibrated";
+
/// <summary>
/// Gets the X component of the acceleration.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the UncalibratedGyroscope sensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.UncalibratedGyroscope, UncalibratedGyroscopeKey);
}
}
public event EventHandler<UncalibratedGyroscopeDataUpdatedEventArgs> DataUpdated;
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.UncalibratedGyroscope, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if uncalibrated gyroscope sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// /// </summary>
public class UncalibratedMagnetometer : Sensor
{
+ private static string UncalibratedMagnetometerKey = "http://tizen.org/feature/sensor.magnetometer.uncalibrated";
+
private event EventHandler<SensorAccuracyChangedEventArgs> _accuracyChanged;
/// <summary>
/// Gets the X component of the acceleration.
get
{
Log.Info(Globals.LogTag, "Checking if the UncalibratedMagnetometer sensor is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.UncalibratedMagnetometer, UncalibratedMagnetometerKey);
}
}
}
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.UncalibratedMagnetometer, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if uncalibrated magnetometer sensor is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// </summary>
public class WalkingActivityDetector : ActivityDetector
{
+ private static string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition";
+
/// <summary>
/// Gets the state of walking activity detector
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the walking activity detector is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.WalkingActivityDetector, ActivityDetectorKey);
}
}
Log.Info(Globals.LogTag, "Creating walking activity gesture detector object");
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.WalkingActivityDetector, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if walking activity detector is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
/// </summary>
public class WristUpGestureDetector : Sensor
{
+ private static string WristUpKey = "http://tizen.org/feature/sensor.wrist_up";
+
/// <summary>
/// Gets the state of the wrist up gesture.
/// </summary>
get
{
Log.Info(Globals.LogTag, "Checking if the wrist up gesture detector is supported");
- return CheckIfSupported();
+ return CheckIfSupported(SensorType.WristUpGestureDetector, WristUpKey);
}
}
return SensorType.WristUpGestureDetector;
}
- private static bool CheckIfSupported()
- {
- bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.WristUpGestureDetector, out isSupported);
- if (error != (int)SensorError.None)
- {
- Log.Error(Globals.LogTag, "Error checking if wrist up gesture detector is supported");
- isSupported = false;
- }
- return isSupported;
- }
-
private static int GetCount()
{
IntPtr list;
// you entered into with Samsung.
using System;
-
+using Tizen.System;
namespace Tizen.System.Sensor
{
}
}
+ internal static bool CheckIfSupported(SensorType type, String key)
+ {
+ bool isSupported = false;
+ bool error = SystemInfo.TryGetValue(key, out isSupported);
+
+ if (!error || !isSupported)
+ {
+ Log.Error(Globals.LogTag, "Error checking if sensor is supported(systeminfo)");
+ return false;
+ }
+
+ int ret = Interop.SensorManager.SensorIsSupported(type, out isSupported);
+ if (ret != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error checking if sensor is supported");
+ isSupported = false;
+ }
+
+ return isSupported;
+ }
+
/// <summary>
/// Starts the sensor.
/// After this the event handlers will start receiving events.
# C# API Requries
BuildRequires: csapi-tizen-nuget
+BuildRequires: csapi-system-nuget
%description
Tizen Sensor API for C#