Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Version settings

I want my Xamarin Android app to support API levels 16 and higher. But I am confused by the fact that there are three different version settings in the properties pane of visual studio.

The names of the properties are

Compile using Android version
Minimum Android to target
Target Android version

Minimum I get. It should be 16. But what about the other two?

enter image description here

like image 206
William Jockusch Avatar asked Apr 03 '14 16:04

William Jockusch


People also ask

How do I enable Android version?

Open settings then go to 'About Phone' Tap 'Android Version' to open up a new screen. Now repeatedly tap on the 'Android version' on this screen.

What is the current Android version?

The Latest Android Version is Android 12 This is because each device manufacturer tends to develop and put their own custom “skin” on top of Android. For example, Samsung Galaxy phones have One UI, Xiaomi has MIUI, OnePlus has OxygenOS, and so on, which causes the delay.

Can I update my Android version?

Updating the OS - If you have received an over-the-air (OTA) notification, you can simply open it up and tap the update button. You can also go to Check for Updates in Settings to initiate the upgrade.


2 Answers

The simple answer

Let all three settings have the same value:

Set Compile using Android version to the version that has all the features you need.

Set Mininum Android to target to Use Compile using SDK version.

Set Target Android version to Use Compile using SDK version.

The less simple answer

If you want to use newer features but still be backwards compatible:

Set Compile using Android version to the version that has all the features you need.

Set Mininum Android to target to the lowest version you want to support.

Set Target Android version to Use Compile using SDK version.

In your code you have to make sure the app works with the minium version as well:

if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Honeycomb)
{
    // Do modern stuff.
}
else
{
    // Do it the old-fashioned way.
}

Read more details here: http://redth.codes/such-android-api-levels-much-confuse-wow/

like image 78
Arne Evertsson Avatar answered Sep 22 '22 22:09

Arne Evertsson


Please check this answer, it is a comprehensive guide about your question: https://stackoverflow.com/a/4994039/2452039

like image 33
tf.alves Avatar answered Sep 25 '22 22:09

tf.alves