-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{CB655C6A-F73B-448E-913C-CA4DCBC5E401}</ProjectGuid>
- <OutputType>Library</OutputType>
- <RootNamespace>Tizen.System.Sensor</RootNamespace>
- <AssemblyName>Tizen.System.Sensor</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <TargetFrameworkProfile />
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <DefineConstants>DEBUG;</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup>
- <SignAssembly>true</SignAssembly>
- </PropertyGroup>
- <PropertyGroup>
- <AssemblyOriginatorKeyFile>Tizen.System.Sensor.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <Import Project="CoreFx.References.targets" />
- <ItemGroup Condition=" '$(CoreFxPath)' == '' ">
- <Reference Include="System" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="Tizen.Internals">
- <HintPath>..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll</HintPath>
- </Reference>
- <Reference Include="Tizen">
- <HintPath>..\..\tizen\Tizen\bin\Debug\Tizen.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Interop\Interop.Sensor.cs" />
- <Compile Include="Tizen.System.Sensor\SensorEnumerations.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\GravitySensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\GyroscopeDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\GyroscopeRotationVectorSensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\HeartRateMonitorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\HumiditySensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\LightSensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\LinearAccelerationSensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\MagnetometerDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\MagnetometerRotationVectorSensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\OrientationSensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\PedometerDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\PressureSensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\ProximitySensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\RotationVectorSensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\SleepMonitorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\TemperatureSensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\UltravioletSensorDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\UncalibratedGyroscopeDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\UncalibratedMagnetometerDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\GravitySensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\Gyroscope.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\GyroscopeRotationVectorSensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\HeartRateMonitor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\HumiditySensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\LightSensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\LinearAccelerationSensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\Magnetometer.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\MagnetometerRotationVectorSensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\OrientationSensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\Pedometer.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\PressureSensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\ProximitySensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\RotationVectorSensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\SleepMonitor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\TemperatureSensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\UltravioletSensor.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\UncalibratedGyroscope.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\UncalibratedMagnetometer.cs" />
- <Compile Include="Tizen.System.Sensor\Sensor.cs" />
- <Compile Include="Interop\Interop.Libraries.cs" />
- <Compile Include="Tizen.System.Sensor\Plugins\Accelerometer.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\SensorAccuracyChangedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\EventArgs\AccelerometerDataUpdatedEventArgs.cs" />
- <Compile Include="Tizen.System.Sensor\SensorErrorFactory.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <None Include="Tizen.System.Sensor.snk" />
- </ItemGroup>
- <ProjectExtensions>
- <MonoDevelop>
- <Properties>
- <Policies>
- <TextStylePolicy EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csharp" />
- <CSharpFormattingPolicy inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />
- <DotNetNamingPolicy DirectoryNamespaceAssociation="None" ResourceNamePolicy="FileFormatDefault" />
- <StandardHeader Text="" IncludeInNewFiles="True" />
- <TextStylePolicy EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/plain" />
- <TextStylePolicy inheritsSet="Mono" inheritsScope="text/plain" scope="application/xml" />
- <XmlFormattingPolicy inheritsSet="Mono" inheritsScope="application/xml" scope="application/xml" />
- </Policies>
- </Properties>
- </MonoDevelop>
- </ProjectExtensions>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>8.0.30703</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{CB655C6A-F73B-448E-913C-CA4DCBC5E401}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <RootNamespace>Tizen.System.Sensor</RootNamespace>\r
+ <AssemblyName>Tizen.System.Sensor</AssemblyName>\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <TargetFrameworkProfile />\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <OutputPath>bin\Debug</OutputPath>\r
+ <DefineConstants>DEBUG;</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <ConsolePause>false</ConsolePause>\r
+ <Prefer32Bit>false</Prefer32Bit>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>none</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <OutputPath>bin\Release</OutputPath>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <ConsolePause>false</ConsolePause>\r
+ <Prefer32Bit>false</Prefer32Bit>\r
+ </PropertyGroup>\r
+ <PropertyGroup>\r
+ <SignAssembly>true</SignAssembly>\r
+ </PropertyGroup>\r
+ <PropertyGroup>\r
+ <AssemblyOriginatorKeyFile>Tizen.System.Sensor.snk</AssemblyOriginatorKeyFile>\r
+ </PropertyGroup>\r
+ <Import Project="CoreFx.References.targets" />\r
+ <ItemGroup Condition=" '$(CoreFxPath)' == '' ">\r
+ <Reference Include="System" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Reference Include="Tizen.Internals">\r
+ <HintPath>..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll</HintPath>\r
+ </Reference>\r
+ <Reference Include="Tizen">\r
+ <HintPath>..\..\tizen\Tizen\bin\Debug\Tizen.dll</HintPath>\r
+ </Reference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Compile Include="Properties\AssemblyInfo.cs" />\r
+ <Compile Include="Interop\Interop.Sensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\FaceDownGestureDetectorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\PickUpGestureDetectorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\RunningActivityDetectorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\StationaryActivityDetectorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\InVehicleActivityDetectorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\WalkingActivityDetectorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\WristUpGestureDetectorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\ActivityDetector.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\PickUpGestureDetector.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\RunningActivityDetector.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\InVehicleActivityDetector.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\StationaryActivityDetector.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\WalkingActivityDetector.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\WristUpGestureDetector.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\FaceDownGestureDetector.cs" />\r
+ <Compile Include="Tizen.System.Sensor\SensorEnumerations.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\GravitySensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\GyroscopeDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\GyroscopeRotationVectorSensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\HeartRateMonitorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\HumiditySensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\LightSensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\LinearAccelerationSensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\MagnetometerDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\MagnetometerRotationVectorSensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\OrientationSensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\PedometerDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\PressureSensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\ProximitySensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\RotationVectorSensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\SleepMonitorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\TemperatureSensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\UltravioletSensorDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\UncalibratedGyroscopeDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\UncalibratedMagnetometerDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\GravitySensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\Gyroscope.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\GyroscopeRotationVectorSensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\HeartRateMonitor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\HumiditySensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\LightSensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\LinearAccelerationSensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\Magnetometer.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\MagnetometerRotationVectorSensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\OrientationSensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\Pedometer.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\PressureSensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\ProximitySensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\RotationVectorSensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\SleepMonitor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\TemperatureSensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\UltravioletSensor.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\UncalibratedGyroscope.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\UncalibratedMagnetometer.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Sensor.cs" />\r
+ <Compile Include="Interop\Interop.Libraries.cs" />\r
+ <Compile Include="Tizen.System.Sensor\Plugins\Accelerometer.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\SensorAccuracyChangedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\EventArgs\AccelerometerDataUpdatedEventArgs.cs" />\r
+ <Compile Include="Tizen.System.Sensor\SensorErrorFactory.cs" />\r
+ </ItemGroup>\r
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />\r
+ <ItemGroup>\r
+ <None Include="Tizen.System.Sensor.snk" />\r
+ </ItemGroup>\r
+ <ProjectExtensions>\r
+ <MonoDevelop>\r
+ <Properties>\r
+ <Policies>\r
+ <TextStylePolicy EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csharp" />\r
+ <CSharpFormattingPolicy inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />\r
+ <DotNetNamingPolicy DirectoryNamespaceAssociation="None" ResourceNamePolicy="FileFormatDefault" />\r
+ <StandardHeader Text="" IncludeInNewFiles="True" />\r
+ <TextStylePolicy EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/plain" />\r
+ <TextStylePolicy inheritsSet="Mono" inheritsScope="text/plain" scope="application/xml" />\r
+ <XmlFormattingPolicy inheritsSet="Mono" inheritsScope="application/xml" scope="application/xml" />\r
+ </Policies>\r
+ </Properties>\r
+ </MonoDevelop>\r
+ </ProjectExtensions>\r
+</Project>\r
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ /// <summary>
+ /// FaceDownGestureDetector changed event arguments. Class for storing the data returned by face down gesture detector.
+ /// </summary>
+ public class FaceDownGestureDetectorDataUpdatedEventArgs : EventArgs
+ {
+ internal FaceDownGestureDetectorDataUpdatedEventArgs(float state)
+ {
+ FaceDown = (DetectorState) state;
+ }
+
+ /// <summary>
+ /// Gets the face down state.
+ /// </summary>
+ public DetectorState FaceDown { get; private set; }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ /// <summary>
+ /// InVehicleActivityDetector changed event arguments. Class for storing the data returned by in-vehicle activity detector
+ /// </summary>
+ public class InVehicleActivityDetectorDataUpdatedEventArgs : EventArgs
+ {
+ internal InVehicleActivityDetectorDataUpdatedEventArgs(float state)
+ {
+ InVehicle = (DetectorState) state;
+ }
+
+ /// <summary>
+ /// Gets the in-vehicle state.
+ /// </summary>
+ public DetectorState InVehicle { get; private set; }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ /// <summary>
+ /// PickUpGestureDetector changed event arguments. Class for storing the data returned by pick up gesture detector
+ /// </summary>
+ public class PickUpGestureDetectorDataUpdatedEventArgs : EventArgs
+ {
+ internal PickUpGestureDetectorDataUpdatedEventArgs(float state)
+ {
+ PickUp = (DetectorState) state;
+ }
+
+ /// <summary>
+ /// Gets the pick up state.
+ /// </summary>
+ public DetectorState PickUp { get; private set; }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ /// <summary>
+ /// RunningActivityDetector changed event arguments. Class for storing the data returned by running activity detector
+ /// </summary>
+ public class RunningActivityDetectorDataUpdatedEventArgs : EventArgs
+ {
+ internal RunningActivityDetectorDataUpdatedEventArgs(float state)
+ {
+ Running = (DetectorState) state;
+ }
+
+ /// <summary>
+ /// Gets the running state.
+ /// </summary>
+ public DetectorState Running { get; private set; }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ /// <summary>
+ /// StationaryActivityDetector changed event arguments. Class for storing the data returned by stationary activity detector
+ /// </summary>
+ public class StationaryActivityDetectorDataUpdatedEventArgs : EventArgs
+ {
+ internal StationaryActivityDetectorDataUpdatedEventArgs(float state)
+ {
+ Stationary = (DetectorState) state;
+ }
+
+ /// <summary>
+ /// Gets the stationary state.
+ /// </summary>
+ public DetectorState Stationary { get; private set; }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ /// <summary>
+ /// WalkingActivityDetector changed event arguments. Class for storing the data returned by walking activity detector
+ /// </summary>
+ public class WalkingActivityDetectorDataUpdatedEventArgs : EventArgs
+ {
+ internal WalkingActivityDetectorDataUpdatedEventArgs(float state)
+ {
+ Walking = (DetectorState) state;
+ }
+
+ /// <summary>
+ /// Gets the walking state.
+ /// </summary>
+ public DetectorState Walking { get; private set; }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ /// <summary>
+ /// WristUpGestureDetector changed event arguments. Class for storing the data returned by wrist up gesture detector
+ /// </summary>
+ public class WristUpGestureDetectorDataUpdatedEventArgs : EventArgs
+ {
+ internal WristUpGestureDetectorDataUpdatedEventArgs(float state)
+ {
+ WristUp = (DetectorState) state;
+ }
+
+ /// <summary>
+ /// Gets the wrist up state.
+ /// </summary>
+ public DetectorState WristUp { get; private set; }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ public abstract class ActivityDetector : Sensor
+ {
+ /// <summary>
+ /// Gets the activity accuracy of activity detector
+ /// </summary>
+ public SensorDataAccuracy ActivityAccuracy { get; protected set; }
+
+ protected abstract void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data);
+
+ internal ActivityDetector(int index) : base(index)
+ {
+ }
+
+ protected override void EventListenStart()
+ {
+ int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error setting event callback for activity detector");
+ throw SensorErrorFactory.CheckAndThrowException(error, "Unable to set event callback for activity detector");
+ }
+ }
+
+ protected override void EventListenStop()
+ {
+ int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error unsetting event callback for activity detector");
+ throw SensorErrorFactory.CheckAndThrowException(error, "Unable to unset event callback for activity detector");
+ }
+ }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ public class FaceDownGestureDetector : Sensor
+ {
+ /// <summary>
+ /// Gets the state of the face down gesture.
+ /// </summary>
+ public DetectorState FaceDown { get; private set; }
+
+ /// <summary>
+ /// Returns true or false based on whether face down gesture detector is supported by device.
+ /// </summary>
+ public static bool IsSupported
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Checking if the face down gesture detector is supported");
+ return CheckIfSupported();
+ }
+ }
+
+ /// <summary>
+ /// Returns the number of face down gesture detector available on the device.
+ /// </summary>
+ public static int Count
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Getting the count of face down gesture detectors");
+ return GetCount();
+ }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Tizen.System.Sensor.FaceDownGestureDetector"/> class.
+ /// </summary>
+ /// <param name='index'>
+ /// Index. Default value for this is 0. Index refers to a particular face down gesture detector in case of multiple sensors.
+ /// </param>
+ public FaceDownGestureDetector(int index = 0) : base(index)
+ {
+ Log.Info(Globals.LogTag, "Creating face down gesture detector object");
+ }
+
+ internal override SensorType GetSensorType()
+ {
+ 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;
+ int count;
+ int error = Interop.SensorManager.GetSensorList(SensorType.FaceDownGestureDetector, out list, out count);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error getting sensor list for face down gesture detector");
+ count = 0;
+ }
+ else
+ Interop.Libc.Free(list);
+ return count;
+ }
+
+ /// <summary>
+ /// Event Handler for storing the callback functions for event corresponding to change in face down gesture detector data.
+ /// </summary>
+ public event EventHandler<FaceDownGestureDetectorDataUpdatedEventArgs> DataUpdated;
+
+ protected override void EventListenStart()
+ {
+ int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error setting event callback for face down gesture detector");
+ throw SensorErrorFactory.CheckAndThrowException(error, "Unable to set event callback for face down gesture detector");
+ }
+ }
+
+ protected override void EventListenStop()
+ {
+ int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error unsetting event callback for face down gesture detector");
+ throw SensorErrorFactory.CheckAndThrowException(error, "Unable to unset event callback for face down gesture detector");
+ }
+ }
+
+ private void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ {
+ Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+ TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+ FaceDown = (DetectorState) sensorData.values[0];
+
+ DataUpdated?.Invoke(this, new FaceDownGestureDetectorDataUpdatedEventArgs(sensorData.values[0]));
+ }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ public class InVehicleActivityDetector : ActivityDetector
+ {
+ /// <summary>
+ /// Gets the state of in-vehicle activity detector
+ /// </summary>
+ public DetectorState InVehicle { get; private set; }
+
+ /// <summary>
+ /// Returns true or false based on whether in-vehicle activity detector is supported by device.
+ /// </summary>
+ public static bool IsSupported
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Checking if the in-vehicle activity detector is supported");
+ return CheckIfSupported();
+ }
+ }
+
+ /// <summary>
+ /// Returns the number of in-vehicle activity detector available on the device.
+ /// </summary>
+ public static int Count
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Getting the count of in-vehicle activity detectors");
+ return GetCount();
+ }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Tizen.System.Sensor.InVehicleActivityDetector"/> class.
+ /// </summary>
+ /// <param name='index'>
+ /// Index. Default value for this is 0. Index refers to a particular in-vehicle activity detector in case of multiple sensors.
+ /// </param>
+ public InVehicleActivityDetector(int index) : base(index)
+ {
+ 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;
+ int count;
+ int error = Interop.SensorManager.GetSensorList(SensorType.InVehicleActivityDetector, out list, out count);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error getting sensor list for in-vehicle activity detector");
+ count = 0;
+ }
+ else
+ Interop.Libc.Free(list);
+ return count;
+ }
+
+ /// <summary>
+ /// Event Handler for storing the callback functions for event corresponding to change in in-vehicle activity detector data.
+ /// </summary>
+ public event EventHandler<InVehicleActivityDetectorDataUpdatedEventArgs> DataUpdated;
+
+ protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ {
+ Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+ TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+ InVehicle = (DetectorState)sensorData.values[0];
+ ActivityAccuracy = (SensorDataAccuracy) sensorData.accuracy;
+
+ DataUpdated?.Invoke(this, new InVehicleActivityDetectorDataUpdatedEventArgs(sensorData.values[0]));
+ }
+
+ internal override SensorType GetSensorType()
+ {
+ return SensorType.InVehicleActivityDetector;
+ }
+ }
+}
internal override SensorType GetSensorType()
{
- return SensorType.HumanPedometer;
+ return SensorType.Pedometer;
}
/// <summary>
private static bool CheckIfSupported()
{
bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.HumanPedometer, out 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");
{
IntPtr list;
int count;
- int error = Interop.SensorManager.GetSensorList(SensorType.HumanPedometer, out list, out count);
+ int error = Interop.SensorManager.GetSensorList(SensorType.Pedometer, out list, out count);
if (error != (int)SensorError.None)
{
Log.Error(Globals.LogTag, "Error getting sensor list for pedometer");
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ public class PickUpGestureDetector : Sensor
+ {
+ /// <summary>
+ /// Gets the state of the pick up gesture.
+ /// </summary>
+ public DetectorState PickUp { get; private set; }
+
+ /// <summary>
+ /// Returns true or false based on whether pick up gesture detector is supported by device.
+ /// </summary>
+ public static bool IsSupported
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Checking if the pick up gesture detector is supported");
+ return CheckIfSupported();
+ }
+ }
+
+ /// <summary>
+ /// Returns the number of pick up gesture detector available on the device.
+ /// </summary>
+ public static int Count
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Getting the count of pick up gesture detectors");
+ return GetCount();
+ }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Tizen.System.Sensor.PickUpGestureDetector"/> class.
+ /// </summary>
+ /// <param name='index'>
+ /// Index. Default value for this is 0. Index refers to a particular pick up gesture detector in case of multiple sensors.
+ /// </param>
+ public PickUpGestureDetector(int index = 0) : base(index)
+ {
+ Log.Info(Globals.LogTag, "Creating pick up gesture detector object");
+ }
+
+ internal override SensorType GetSensorType()
+ {
+ return SensorType.PickUpGestureDetector;
+ }
+
+ private static bool CheckIfSupported()
+ {
+ bool isSupported;
+ int error = Interop.SensorManager.SensorIsSupported(SensorType.PickUpGestureDetector, out isSupported);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error checking if pick up gesture detector is supported");
+ isSupported = false;
+ }
+ return isSupported;
+ }
+
+ private static int GetCount()
+ {
+ IntPtr list;
+ int count;
+ int error = Interop.SensorManager.GetSensorList(SensorType.PickUpGestureDetector, out list, out count);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error getting sensor list for pick up gesture detector");
+ count = 0;
+ }
+ else
+ Interop.Libc.Free(list);
+ return count;
+ }
+
+ /// <summary>
+ /// Event Handler for storing the callback functions for event corresponding to change in pick up gesture detector data.
+ /// </summary>
+ public event EventHandler<PickUpGestureDetectorDataUpdatedEventArgs> DataUpdated;
+
+ protected override void EventListenStart()
+ {
+ int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error setting event callback for pick up gesture detector");
+ throw SensorErrorFactory.CheckAndThrowException(error, "Unable to set event callback for pick up gesture detector");
+ }
+ }
+
+ protected override void EventListenStop()
+ {
+ int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error unsetting event callback for pick up gesture detector");
+ throw SensorErrorFactory.CheckAndThrowException(error, "Unable to unset event callback for pick up gesture detector");
+ }
+ }
+
+ private void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ {
+ Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+ TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+ PickUp = (DetectorState) sensorData.values[0];
+
+ DataUpdated?.Invoke(this, new PickUpGestureDetectorDataUpdatedEventArgs(sensorData.values[0]));
+ }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ public class RunningActivityDetector : ActivityDetector
+ {
+ /// <summary>
+ /// Gets the state of running activity detector
+ /// </summary>
+ public DetectorState Running { get; private set; }
+
+ /// <summary>
+ /// Returns true or false based on whether running activity detector is supported by device.
+ /// </summary>
+ public static bool IsSupported
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Checking if the running activity detector is supported");
+ return CheckIfSupported();
+ }
+ }
+
+ /// <summary>
+ /// Returns the number of running activity detector available on the device.
+ /// </summary>
+ public static int Count
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Getting the count of running activity detectors");
+ return GetCount();
+ }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Tizen.System.Sensor.RunningActivityDetector"/> class.
+ /// </summary>
+ /// <param name='index'>
+ /// Index. Default value for this is 0. Index refers to a particular running activity detector in case of multiple sensors.
+ /// </param>
+ public RunningActivityDetector(int index) : base(index)
+ {
+ 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;
+ int count;
+ int error = Interop.SensorManager.GetSensorList(SensorType.RunningActivityDetector, out list, out count);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error getting sensor list for running activity detector");
+ count = 0;
+ }
+ else
+ Interop.Libc.Free(list);
+ return count;
+ }
+
+ /// <summary>
+ /// Event Handler for storing the callback functions for event corresponding to change in running activity detector data.
+ /// </summary>
+ public event EventHandler<RunningActivityDetectorDataUpdatedEventArgs> DataUpdated;
+
+ protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ {
+ Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+ TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+ Running = (DetectorState)sensorData.values[0];
+ ActivityAccuracy = (SensorDataAccuracy) sensorData.accuracy;
+
+ DataUpdated?.Invoke(this, new RunningActivityDetectorDataUpdatedEventArgs(sensorData.values[0]));
+ }
+
+ internal override SensorType GetSensorType()
+ {
+ return SensorType.RunningActivityDetector;
+ }
+ }
+}
internal override SensorType GetSensorType()
{
- return SensorType.HumanSleepMonitor;
+ return SensorType.SleepMonitor;
}
/// <summary>
private static bool CheckIfSupported()
{
bool isSupported;
- int error = Interop.SensorManager.SensorIsSupported(SensorType.HumanSleepMonitor, out 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");
{
IntPtr list;
int count;
- int error = Interop.SensorManager.GetSensorList(SensorType.HumanSleepMonitor, out list, out count);
+ int error = Interop.SensorManager.GetSensorList(SensorType.SleepMonitor, out list, out count);
if (error != (int)SensorError.None)
{
Log.Error(Globals.LogTag, "Error getting sensor list for sleep");
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ public class StationaryActivityDetector : ActivityDetector
+ {
+ /// <summary>
+ /// Gets the state of stationary activity detector
+ /// </summary>
+ public DetectorState Stationary { get; private set; }
+
+ /// <summary>
+ /// Returns true or false based on whether stationary activity detector is supported by device.
+ /// </summary>
+ public static bool IsSupported
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Checking if the stationary activity detector is supported");
+ return CheckIfSupported();
+ }
+ }
+
+ /// <summary>
+ /// Returns the number of stationary activity detector available on the device.
+ /// </summary>
+ public static int Count
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Getting the count of stationary activity detectors");
+ return GetCount();
+ }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Tizen.System.Sensor.stationaryActivityDetector"/> class.
+ /// </summary>
+ /// <param name='index'>
+ /// Index. Default value for this is 0. Index refers to a particular stationary activity detector in case of multiple sensors.
+ /// </param>
+ public StationaryActivityDetector(int index) : base(index)
+ {
+ 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;
+ int count;
+ int error = Interop.SensorManager.GetSensorList(SensorType.StationaryActivityDetector, out list, out count);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error getting sensor list for stationary activity detector");
+ count = 0;
+ }
+ else
+ Interop.Libc.Free(list);
+ return count;
+ }
+
+ /// <summary>
+ /// Event Handler for storing the callback functions for event corresponding to change in stationary activity detector data.
+ /// </summary>
+ public event EventHandler<StationaryActivityDetectorDataUpdatedEventArgs> DataUpdated;
+
+ protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ {
+ Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+ TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+ Stationary = (DetectorState)sensorData.values[0];
+ ActivityAccuracy = (SensorDataAccuracy) sensorData.accuracy;
+
+ DataUpdated?.Invoke(this, new StationaryActivityDetectorDataUpdatedEventArgs(sensorData.values[0]));
+ }
+
+ internal override SensorType GetSensorType()
+ {
+ return SensorType.StationaryActivityDetector;
+ }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ public class WalkingActivityDetector : ActivityDetector
+ {
+ /// <summary>
+ /// Gets the state of walking activity detector
+ /// </summary>
+ public DetectorState Walking { get; private set; }
+
+ /// <summary>
+ /// Returns true or false based on whether walking activity detector is supported by device.
+ /// </summary>
+ public static bool IsSupported
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Checking if the walking activity detector is supported");
+ return CheckIfSupported();
+ }
+ }
+
+ /// <summary>
+ /// Returns the number of walking activity detector available on the device.
+ /// </summary>
+ public static int Count
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Getting the count of walking activity detectors");
+ return GetCount();
+ }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Tizen.System.Sensor.walkingActivityDetector"/> class.
+ /// </summary>
+ /// <param name='index'>
+ /// Index. Default value for this is 0. Index refers to a particular walking activity detector in case of multiple sensors.
+ /// </param>
+ public WalkingActivityDetector(int index) : base(index)
+ {
+ 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;
+ int count;
+ int error = Interop.SensorManager.GetSensorList(SensorType.WalkingActivityDetector, out list, out count);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error getting sensor list for walking activity detector");
+ count = 0;
+ }
+ else
+ Interop.Libc.Free(list);
+ return count;
+ }
+
+ /// <summary>
+ /// Event Handler for storing the callback functions for event corresponding to change in walking activity gesture detector data.
+ /// </summary>
+ public event EventHandler<WalkingActivityDetectorDataUpdatedEventArgs> DataUpdated;
+
+ protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ {
+ Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+ TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+ Walking = (DetectorState)sensorData.values[0];
+ ActivityAccuracy = (SensorDataAccuracy) sensorData.accuracy;
+
+ DataUpdated?.Invoke(this, new WalkingActivityDetectorDataUpdatedEventArgs(sensorData.values[0]));
+ }
+
+ internal override SensorType GetSensorType()
+ {
+ return SensorType.WalkingActivityDetector;
+ }
+ }
+}
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+ public class WristUpGestureDetector : Sensor
+ {
+ /// <summary>
+ /// Gets the state of the wrist up gesture.
+ /// </summary>
+ public DetectorState WristUp { get; private set; }
+
+ /// <summary>
+ /// Returns true or false based on whether wrist up gesture detector is supported by device.
+ /// </summary>
+ public static bool IsSupported
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Checking if the wrist up gesture detector is supported");
+ return CheckIfSupported();
+ }
+ }
+
+ /// <summary>
+ /// Returns the number of wrist up gesture detector available on the device.
+ /// </summary>
+ public static int Count
+ {
+ get
+ {
+ Log.Info(Globals.LogTag, "Getting the count of wrist up gesture detectors");
+ return GetCount();
+ }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Tizen.System.Sensor.WristUpGestureDetector"/> class.
+ /// </summary>
+ /// <param name='index'>
+ /// Index. Default value for this is 0. Index refers to a particular wrist up gesture detector in case of multiple sensors.
+ /// </param>
+ public WristUpGestureDetector(int index = 0) : base(index)
+ {
+ Log.Info(Globals.LogTag, "Creating wrist up gesture detector object");
+ }
+
+ internal override SensorType GetSensorType()
+ {
+ 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;
+ int count;
+ int error = Interop.SensorManager.GetSensorList(SensorType.WristUpGestureDetector, out list, out count);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error getting sensor list for wrist up gesture detector");
+ count = 0;
+ }
+ else
+ Interop.Libc.Free(list);
+ return count;
+ }
+
+ /// <summary>
+ /// Event Handler for storing the callback functions for event corresponding to change in wrist up gesture detector data.
+ /// </summary>
+ public event EventHandler<WristUpGestureDetectorDataUpdatedEventArgs> DataUpdated;
+
+ protected override void EventListenStart()
+ {
+ int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error setting event callback for wrist up gesture detector");
+ throw SensorErrorFactory.CheckAndThrowException(error, "Unable to set event callback for wrist up gesture detector");
+ }
+ }
+
+ protected override void EventListenStop()
+ {
+ int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
+ if (error != (int)SensorError.None)
+ {
+ Log.Error(Globals.LogTag, "Error unsetting event callback for wrist up gesture detector");
+ throw SensorErrorFactory.CheckAndThrowException(error, "Unable to unset event callback for wrist up gesture detector");
+ }
+ }
+
+ private void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ {
+ Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+ TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+ WristUp = (DetectorState) sensorData.values[0];
+
+ DataUpdated?.Invoke(this, new WristUpGestureDetectorDataUpdatedEventArgs(sensorData.values[0]));
+ }
+ }
+}
/// <summary>
/// Pedometer sensor.
/// </summary>
- HumanPedometer = 0x300,
+ Pedometer = 0x300,
/// <summary>
/// Sleep monitor sensor.
/// </summary>
- HumanSleepMonitor = 22
+ SleepMonitor = 0x301,
+ /// <summary>
+ /// Walking activity detector.
+ /// </summary>
+ WalkingActivityDetector = 0x401,
+ /// <summary>
+ /// Running activity detector.
+ /// </summary>
+ RunningActivityDetector = 0x402,
+ /// <summary>
+ /// Stationary activity detector.
+ /// </summary>
+ StationaryActivityDetector = 0x408,
+ /// <summary>
+ /// InVehicle activity detector.
+ /// </summary>
+ InVehicleActivityDetector = 0x409,
+ /// <summary>
+ /// Wrist up gesture detector.
+ /// </summary>
+ WristUpGestureDetector = 0x1201,
+ /// <summary>
+ /// Pick up gesture detector.
+ /// </summary>
+ PickUpGestureDetector = 0x1204,
+ /// <summary>
+ /// Face down gesture detector.
+ /// </summary>
+ FaceDownGestureDetector = 0x1205
}
/// <summary>
/// <summary>
/// The wake state.
/// </summary>
-
Wake,
+
/// <summary>
/// The sleeping state.
/// </summary>
/// </summary>
Far = 5
}
+
+ /// <summary>
+ /// Detector sensor state.
+ /// </summary>
+ public enum DetectorState
+ {
+ /// <summary>
+ /// None sate.
+ /// </summary>
+ NotDetected = 0,
+
+ /// <summary>
+ /// Detected state.
+ /// </summary>
+ Detected = 1
+ }
}