jamesmontemagno / DeviceInfoPlugin

Device Information Plugin for Xamarin and Windows
Other
145 stars 44 forks source link

CrossDeviceInfo.Current.VersionNumber return 0.0 on Android Pie #69

Closed BBenGit closed 5 years ago

BBenGit commented 5 years ago

I am using the plugin to change notification settings on Android depending on the version. But I run in an issue on Android Pie 9.0 devices. I tested it on both emulator and real device.

Bug Information

Version Number of Plugin: 4.0.0.13 Device Tested On: Xiaomi Mi A1 - Android Pie 9.0 Simulator Tested On: Android Pie 9.0 Version of VS: 15.9.5 Version of Xamarin: 4.12.3.78

Steps to reproduce the Behavior

Add plugin Using the plugin check versionNumber on Android Pie device.

Expected Behavior

return System.version object with 9.0

Actual Behavior

return System.version object with 0.0

Code snippet

System.Version androidVersion = CrossDeviceInfo.Current.VersionNumber;

Screenshotst

screenshot_3

jamesmontemagno commented 5 years ago

Can you try 4.1.0 beta for me. Pretty sure I fixed there. Also you can use Xamarin.Essentials for this.

BBenGit commented 5 years ago

Works on 4.1.1. Thanks for the reply.

jamesmontemagno commented 5 years ago

I'm going to push this to stable.