5
(4)

How to get App current version information in Android using Xamarin C#?

When you are working with the Xamarin Android application or Xamarin iOS application, May some times required a current version of application from the code. Here is the code to get App current version information in Android using Xamarin C#.

Thanks to Xamarin.Essentials reference namespace which provides VersionTracking class. The VersionTracking class lets you check the version of the application and build numbers along with seeing additional information.

Add a reference to Xamarin.Essentials in your class:

using Xamarin.Essentials;

Call Track Method

VersionTracking.Track();

Read Current Version

// Current app version (1.0.0)
var currentVersion = VersionTracking.CurrentVersion;

You can update version information in Android Manifest.

Project-> Right Click -> Properties -> Android Manifest

Get App current version information in Android using Xamarin C#
Get App current version information in Android using Xamarin C#

View all Xamarin related posts: Xamarin

Read more about Version Tracking in Xamarin: Click Here

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 4

No votes so far! Be the first to rate this post.

As you found this post useful...

Share this post on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?