Closed pollaris closed 6 years ago
Hi @pollaris, thank you for the feedback!
What version of plugin do you use?
Xamarin.Forms or Xamarin.Native?
Also, please check initialization of CurrentActivity plugin: For Xamarin.Native: https://github.com/wcoder/Xamarin.Plugin.DeviceOrientation/blob/master/samples/DeviceOrientation.Samples.Droid/MainApplication.cs#L34 Xamarin.Forms: https://github.com/wcoder/Xamarin.Plugin.DeviceOrientation/blob/master/samples/Xamarin.Forms-sample/TestNugetDeviceOrientationPlugin/TestNugetDeviceOrientationPlugin.Android/MainActivity.cs#L16
I was using Xamarin Forms. I decided to use
protected override void OnSizeAllocated(double width, double height)
instead. As far as my question, thank you for pointing out that I was not including
CrossCurrentActivity.Current.Activity = this;
in the Droid section. Cheers, -Russ
On android with:
I get:
Working normally on Windows Phone.