Getting Started

PLATFORMS

Platform Version
iOS 7+
Android 4.3+
Windows UWP (including core) 16299+
Tizen 4.x+
watchOS 4.x
.NET Standard 2.0

SUPPORTED SENSORS

SETUP

  1. Be sure to install the Shiny.Sensors nuget package in your shared code project NuGet

  2. To use each type of sensor, use the following in your ShinyStartup:

using Shiny;
using Microsoft.Extensions.DependencyInjection;

namespace YourNamespace
{
	public class YourStartup : ShinyStarup
	{
		services.UseAccelerometer();
		services.UseAmbientLightSensor();
		services.UseBarometer();
		services.UseCompass();
		services.UseMagnetometer();
		services.UsePedometer();
		services.UseProximitySensor();
		services.UseHeartRateMonitor();
		services.UseTemperature();
		services.UseHumidity();	
	}
}

NOTE: each Use returns a boolean as to whether or not it is supported. You can use optional dependencies (ie. IDependency dep = null) in your viewmodels/services then check for null to see if the sensor is available on the device.

GitHub