Accessing the Android Barometer using Xamarin.Android
Easily:
< ![CDATA[
[Activity (Label = "HelloBarometer", MainLauncher = true)]
public class Activity1 : Activity, ISensorEventListener
{
TextView mainLabel;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
//Detect the barometer
var sm = (SensorManager) this.GetSystemService(Context.SensorService);
var barry = sm.GetDefaultSensor(SensorType …