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
1
vote
0 answers

Is there a way to compile a library only for devices higher then some SDK version in Gradle in Android Studio

I wish to add the following to my Android App via Gradle: dependencies { ... compile "com.android.support:support-dynamic-animation:25.3.0" } but devices with Sdk version less then Sdk Version=16 do not support this library. Is there a way…
1
vote
1 answer

manage periodic tasks with job Scheduler?

Basically what I want to do is, when there is an internet connection then collect values from sensors and schedule the next time data is collected from sensors, let's say 5 minutes (this interval depends on the current activity: walking,…
1
vote
2 answers

bringToFront() not working in Lollipop

I have used a search widget in my app. I wanted to bring it in front of everything and I did it and tested it on real device. It worked fine. But when I tested it on a lollipop device, it didn't work. I then came to know that bringToFront() doesn't…
Soumya Rauth
  • 1,163
  • 5
  • 16
  • 32
1
vote
1 answer

Google Play Console API level 26+

I try to upload a beta version of an app on Google Play Console. I got this error message: This configuration cannot be published for the following reason(s): It is forbidden that a device upgrading from API levels in range 14-25 to API levels…
Dorian Reul
  • 11
  • 1
  • 3
1
vote
1 answer

Strange custom SeekBar drawable behavior on different APIs

On devices running Android API <= 22, my custom SeekBar looks as follows: On devices running Android API >= 23, my custom SeekBar looks as follows: Why does my SeekBar drawable look incorrect on devices API >= 23? Here is my…
1
vote
1 answer

How to know the api version and the android source code

I download the android source code here : https://github.com/android But my problem is how to know the api version of each branch, like for exemple for the branch: gingerbread-release ics-mr0-release ics-mr1-release jb-release kitkat-release…
zeus
  • 12,173
  • 9
  • 63
  • 184
1
vote
1 answer

Custom view layout line overstriking other elements in API 16

The problem: What I need: Everything works fine on API 23, but in API 16 I get this problem running it in emulator. Android Studio also shows the correct layout on the device screen.
1
vote
1 answer

How to change direction of items in flexbox-layout

I want to use flex-layout in my android application, but in right to left direction in pre-17 API device. can anybody help me?
faeze saghafi
  • 650
  • 10
  • 25
1
vote
3 answers

Downgrading from API 24 to API 23

I cant drag and drop items either on activity_main.xml file or content_main.xml file. From my research, I learned that I have to downgrade from android API 24 to android API 23, but when I click on API 24 image to downgrade I can't find API 23.
mohammad
  • 2,142
  • 7
  • 35
  • 60
1
vote
1 answer

Declaration of field without initializations and usages in Java

I have a question which refers to java compiler behavior and also different APIs of android. I have class representing Bluetooth LE connection. And I check version of API in this class to know which methods to scan for devices I must use. Here it…
1
vote
1 answer

Android Target API - How to test how low I can go?

I am just about to release an application (To friends and family at least). My project API levels are: minSdkVersion 19 targetSdkVersion 23 I hear this question a lot when people are about to start their endeavour; What API level should I…
Treeline
  • 475
  • 1
  • 8
  • 23
1
vote
1 answer

How to get a compile time error instead of NoSuchMethodError run-time error for android API level inconsistencies?

I have an Android Xamarin appliation with android:minSdkVersion="15" and android:targetSdkVersion="21". Turned out that IDE (xamarin studio, visual studio) and compilation process just ignore if I'm using something above API 15 which is not expected…
Mando
  • 11,414
  • 17
  • 86
  • 167
1
vote
0 answers

Android platform version by country

Is there any way to get the platform versions like in here Android Dashboard but regarding each country? I'm going to start a project which only targets Germany and I am interested in knowing which is the lowest API version for that country, as in…
David
  • 901
  • 1
  • 13
  • 37
1
vote
2 answers

ScriptIntrinsicBlur on Bitmap API<14

I need to put blurred background image on Navigation header view in Android API<14. I read lot of documentation on ScriptIntrinsicBlur but he has been added on API<17. I know getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND) exist…
E. Spiroux
  • 430
  • 6
  • 15
1
vote
0 answers

Foregrounded service behaves differently on later API version

tl;dr... Service is getting less runtime on newer API. My android app was originally written targeting android 4.3 (API version 18) because the phone I had at the time was an older one. Now I have a shiny new phone with Lollipop 5.1.1 (API…
user5069935