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
3
votes
1 answer

How to develop legacy Android app (api>=10) with android studio?

I'm trying to develop an app for my (very) old Android phone with Gingerbread, api 10. But with android studio as IDE the problems seem to go on forever: in project wizard, only api>=14 is supported so I choose 14 and want to change later on I…
3
votes
2 answers

Create Color from rgb Stringin Java

This is my code to convert a String to Color: public Color prepareColour(String str) { str.replace("#", ""); float r = Float.valueOf(str.substring(0,1)); float g = Float.valueOf(str.substring(2,3)); float b =…
3
votes
2 answers

Android layout Issue - showing differently on different devices.

I have some xml which working fine with api level above 17 but showing differently on phones api below same. My minSDK is 15. Should i make layout v-17 , v-16 , v-15 separately or is there any other way around which works for all three at…
young_08
  • 1,196
  • 2
  • 13
  • 35
3
votes
0 answers

start android background service on available internet connection?

I know about the update starting from api24 which states that a background service can't be launched based on network change and that there should be a foreground activity. So I've tried using jobscheduler but it only works on api >= 21 so in order…
3
votes
1 answer

Is it a good idea to forgo appcompat for a project with minimum API level 21?

I'm starting a project with a minimum API level of 21, trying to figure out the right way to implement the ActionBar. The official docs start with using the appcompat library, and the main advantage listed is that it preserves compatibility back to…
3
votes
4 answers

Android: able to install app for unsupported Android version

We're dropping support for Android 2.3 (API level 9) devices because most of our users have a newer Android version on their phones. I've updated the minimum SDK version to api level 14. android { compileSdkVersion 23 buildToolsVersion…
3
votes
0 answers

Finding an appropriate replacement for LauncherActivityInfo

In API level 21 LauncherActivityInfo was introduced. I currently have to implement a program which uses the getApplicationInfo(), getBadgedIcon(), getLabel() and getIcon(). I have searched on stackoverflow and on google and I cannot seem to find…
Lind
  • 277
  • 2
  • 5
  • 16
3
votes
1 answer

How to design right to left android.support.design.widget.NavigationView?

I want to customize android.support.design.widget.NavigationView class to make NavigationItems right to left such that navigation item icons appear at the right side of the text. Support library versions used: compile…
3
votes
0 answers

Sources for 'Android API 11 Platform' not found

I'm trying to compile an android project using Android Studio. Originally, it's an Eclipse Project. I want to import the project from Android Studio; however, I encountered some problems. In all of the .class files, it showed "Decompiled .class…
Huei
  • 31
  • 2
3
votes
3 answers

How to check API level of device and use Actionbar if API is 11 or higher?

My app is using Actionbar to set title and show subtitle which keeps changing according to user interaction, i am also using splitActionBarWhenNarrow and showing menu options in actionbar. I want my app to support devices with older version of…
Darshan
  • 515
  • 1
  • 3
  • 16
2
votes
1 answer

Android Studio's emulator API level 31 (Android S) not turning its Bluetooth on

I'm trying to turn the Bluetooth on in android studio's emulator with API level 31 (Android S) but I can't. When I click on the Bluetooth icon to turn it on, it remains on Turning on... and never changes to on. I got the following logs filtered by…
2
votes
0 answers

From an app developers perspective, what happens when I root my Android phone?

This question was born out of pure curiosity and the lack of relevant material, I couldn't find on the on Internet. My question is simple, from the perspective of an Android developer, what changes when I root my phone. For example, in Android 10…
vipulbhj
  • 710
  • 5
  • 21
2
votes
1 answer

My Android app is not working properly once I set targetSDK as API 30; how do I figure out the reason(s)?

According to Google, all new Google Play apps from August 2021 would need to target API 30, besides being derived as Android App Bundles. Furthermore, from November 2021, even app updates would need to conform. So I was updating my app from…
auspicious99
  • 3,902
  • 1
  • 44
  • 58
2
votes
0 answers

How to preserve shared element transitions between multiple activities - broken in API30?

I have three activities A, B and C, and use shared element transitions between A and B and between B and C. A -> B works fine, and then using back button or finishAfterTransition smoothly reverses the transition from B back to A. B -> C works fine…
2
votes
3 answers

How to target multiple API levels?

I am looking to use Android's Camera.open() method on two separate API levels. First is API level 7, which is 2.1 and higher and the second is 2.3.3 & 2.3.4 which are API level 9. On API level 7 and 8 the Camera.open method does not take any…
Kevin Parker
  • 16,975
  • 20
  • 76
  • 105