Questions tagged [android-api-levels]

Each Android version is assigned a unique integer identifier, called the API Level.

As the Android platform evolves and new Android versions are released, each Android version is assigned a unique integer identifier, called the API Level. Because users install apps on older as well as the most recent versions of Android, real-world Android apps must be designed to work with multiple Android API levels.

Each release of Android goes by multiple names:

  • The Android version, such as Android 4.4
  • The API level, such as "API Level 19"
  • A dessert name, such as "KitKat"

Each Android device supports exactly one API level – this API level is guaranteed to be unique per Android platform version. The API level exactly identifies the version of the libraries that your app can call into; it identifies the combination of manifest elements, permissions, etc. that you code against as a developer. Android's system of API levels helps Android determine whether an application is compatible with an Android system image prior to installing the application on a device. When an application is built, it contains the following API level information:

  • The target API level of Android that the app is built to run on.
  • The minimum API level of Android that is required to run the app.

These settings are used to ensure that the functionality needed to run the app correctly is available on the Android device at installation time. If not, the app is blocked from running on that device. For example, if the API level of an Android device is lower than the minimum API level that you specify for your app, the Android device will prevent the user from installing your app.

Source: https://developer.xamarin.com/guides/android/application_fundamentals/understanding_android_api_levels/

324 questions
2
votes
1 answer

Android - setLayoutDirection in API 15 and API 16

Does anyone know if ViewCompat.setLayoutDirection works in API level below 17? I search for a solution all over the internet but I can't find a solid one.
gil cohen
  • 333
  • 2
  • 8
  • 21
2
votes
1 answer

Layout-start-end,left-right concepts

I am little confused regarding usage of below attributes. > android:layout_marginRight and android:layout_marginEnd > android:layout_marginLeft and android:layout_marginStart > android:layout_toLeftOf and android:layout_toStartOf >…
2
votes
2 answers

Does API level 8 support is going to finish up in coming days.?

I have Updated my Android Studio to 2.2.2 and installed Latest SDK. Now Build tools version is 25.0.0, but when I tried creating a new project, in minimum SDK section there is no API level 8 (Froyo) option. Also I tried importing my project which…
2
votes
1 answer

call requires API level 21 (current min is 17): android.hardware.camera2.CameraDevice.StateCallback

Error in Android Studio. I have smartphone with android 4.4.2 and i can't instal the newer. What I should to do? private CameraDevice.StateCallback mCameraDeviceStateCallback = new CameraDevice.StateCallback(){ @Override public void…
2
votes
3 answers

Android: Unable to set getContext() in non-static method - requires API Level 23

Below, is some source code which is being called from a non-static method. I'm getting the error "Call requires API level 23 (current min is 15); android.app.Fragment#getContext" android.content.Context context = (Context) getContext(); How…
JustBeingHelpful
  • 18,332
  • 38
  • 160
  • 245
2
votes
1 answer

JellyBean behaves differently with picture capturing

I am developing an Android app for Jellybean, KitKat and Lollipop and several different devices. At the beginning of project, I used the Jellybean API library with target API 'anroid-18' using 'Samsung galaxy note 2014 edition'. A few months later,…
tommybee
  • 2,409
  • 1
  • 20
  • 23
2
votes
0 answers

getScript alternative for Android API 19

I have an application in Android API level 21 and it's currently using the getScript method which was added in the same api level in class Locale. The application must have backwards compatibility with Android API level 19 and I need another…
Lind
  • 277
  • 2
  • 5
  • 16
2
votes
1 answer

It is possible to compile with Api 23 (6.0) and to maintain the old permission system (install-time)?

I readed this in the official android blog: Permission Changes With Marshmallow, permissions have moved from install-time to runtime. This is a mandatory change for SDK 23+, meaning it will affect all developers and all applications…
2
votes
2 answers

FragmentActivity class for below api level 11 devices

I am new to android development. I created class and extend that class from FragmentActivity. When I use this function getFragmentManager() it does not allow me to do it I am also unable to use getSupportFragmentManager because its also giving me…
user786
  • 3,902
  • 4
  • 40
  • 72
2
votes
1 answer

Newbie Android Error: java.lang.NoClassDefFoundError: android.content.ClipboardManager

In my Android app, I happen to use the following code to copy text from a TextView. buttonCopy.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String copyText; copyText = textBox2.getText().toString(); myClip…
2
votes
2 answers

Use CreativeSDK below API level 14?

For some reason the original Aviary framework has stopped working and this has forced me to migrate our code to use the new CreativeSDK instead. Unfortunately this new SDK has a minSdkVersion of 14 = Android 4.0, but a lot of our customers still…
2
votes
1 answer

How to implement TextView line spacing methods for older Android API?

Previously, I asked a question titled: "How to paginate text in Android" on stackoverflow, which lead to a great answer that helped me so much. Now I need to port the code on the older Android API, and in case, Android API version 8, so I can run my…
Ho1
  • 1,239
  • 1
  • 11
  • 29
2
votes
1 answer

Cannot change API Level on Android Studio

I'm very new to Android development and this is one of my first projects. I realized that my API Level is set to 20 when datepicker gave an "exception rasied during rendering" error. I wanted to change the API level to 19 as the API 20 is set to…
2
votes
3 answers

How to get the alpha value of a Drawable for api less than 19

I have a drawable object in my Activity. setAlpha() for drawable was introduced in API level 1 but getAlpha() was introduced in API level 19(KitKat). Is there any alternative API or support library to get the alpha/opacity value of the drawable. And…
Dileep Perla
  • 1,865
  • 7
  • 33
  • 54
2
votes
1 answer

Android API < 8 where did they go?

In the sdk manager I can only see API levels 8+, how can I download api lower than that. I want to make my app compatible with 2.1.X, 2.1, and 2.0 at least
J. Arenas
  • 493
  • 1
  • 9
  • 23