Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Visual Studio and DeviceInfo Match but OS on Android Phone says 9.1 #76

Closed
DwainSnickles opened this issue Aug 7, 2020 · 3 comments
Closed

Comments

@DwainSnickles
Copy link

DwainSnickles commented Aug 7, 2020

My Phone P31 Pro S6 which I purchased just for debugging about phone says Android Version 9.1 but Visual Studio and I also did a app using the latest version of deviceInfoPlug in as follows
<Debug.WriteLine("Generated AppId: " + CrossDeviceInfo.Current.GenerateAppId());' 'Debug.WriteLine("Generated AppId: " + CrossDeviceInfo.Current.GenerateAppId(true));' 'Debug.WriteLine("Id: " + CrossDeviceInfo.Current.Id);' 'Debug.WriteLine("Model: " + CrossDeviceInfo.Current.Model);' 'Debug.WriteLine("Platform: " + CrossDeviceInfo.Current.Platform);' 'Debug.WriteLine("Version: " + CrossDeviceInfo.Current.Version);>
these both say P31 Pro S6 Android 5.1 Api 22 Which one is accurate The Phone or the code?
VSImage

VSImage1
P31ProS6

@jamesmontemagno
Copy link
Owner

Looks like the device is reporting it wrong. It is using Build.VERSION.Release, which is the official API. Nothing I can do here.

I recommend switching to Xamarin.Essentials -> https://docs.microsoft.com/en-us/xamarin/essentials/device-information?context=xamarin%2Fxamarin-forms&tabs=ios

@DwainSnickles
Copy link
Author

Not the end of the world it still works I did do an Xarmin run test as suggested with the following results. Thanks for your quick response.
[0:] P31 Pro
[0:] S6
[0:] 5.1
[0:] Android
[0:] Phone
[0:] Physical

@jamesmontemagno
Copy link
Owner

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants