Retrieve application and OS information UWP

Here’re some codes for retrieving application package as well as OS information in UWP

App version:

Package package = Package.Current;
PackageId packageId = package.Id;
PackageVersion version = packageId.Version;
var ApplicationVersion = $”{version.Major}.{version.Minor}.{version.Build}.{version.Revision}”;

Device Family:

AnalyticsVersionInfo ai = AnalyticsInfo.VersionInfo;
var SystemFamily = ai.DeviceFamily;

OS version:

string sv = AnalyticsInfo.VersionInfo.DeviceFamilyVersion;
ulong v = ulong.Parse(sv);
ulong v1 = (v & 0xFFFF000000000000L) >> 48;
ulong v2 = (v & 0x0000FFFF00000000L) >> 32;
ulong v3 = (v & 0x00000000FFFF0000L) >> 16;
ulong v4 = (v & 0x000000000000FFFFL);
var systemVersion = $”{v1}.{v2}.{v3}.{v4}”;

Device manufacturer and model:

EasClientDeviceInformation eas = new EasClientDeviceInformation();
var DeviceManufacturer = eas.SystemManufacturer;
var DeviceModel = eas.SystemProductName;


How do you relax in your life?

There’re so many ways for relaxing – sport, work out, game… But for me, it’ music. I can’t image how my life go without music. Can’t stop listen to music while coding, cooking, doing anything

I’ve started playing organ, learned some favorite song from Youtube since my parent bought me one and now I have an electric piano by my own money. My dad asked me, why you bought a piano not a TV (I’ve moved to new house and have no stuff). Just because I love piano more than TV shows and movies 😉

“I cannot go a day without listening to music”

I’m free developer now. Spend all of my time for coding and always playing some music while coding. It just make me more focus and feel the life in many amazing ways

“Music helps me escape from reality I live in”

You can try open a favorite MV and focus on the emotions, the eyes, the voices of  singer while performing their song, you’ll see something make you feel better!