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:
Microsoft.Devices.Sensors
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
Yep, that works great. Very easy to use too!