Can't find reference for Microsoft.Devices.Sensors

Hi all,

I’m trying to add accelerometer support to an Android game, and as I understand it, I need to reference Microsoft.Devices.Sensors. However, when I right-click on my project and go ‘add reference’, I can’t see anything like that in the list:

image

Where am I going wrong?

Cheers!

Consulting the documentation I see that Microsoft.Devices.Sensors is a Windows Apps thing, which is probably why you don’t see it on Android projects.

When working with Android/iOS on C# try googling for Xamarin instead https://docs.microsoft.com/en-us/xamarin/essentials/accelerometer

1 Like

Yep, that works great. Very easy to use too!