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
2 answers

Is it okay to always use a high API level?

I am a beginner. Whenever I write code, I get confused. It is when the compiler issues warnings about the API level (SDK version), either in XML code or in Java code. In my gradle, the current minSdkVersion is 19. Originally it was around 16. When I…
ybybyb
  • 1,385
  • 1
  • 12
  • 33
1
vote
1 answer

Toast appearing on Bottom even though Gravity is set to TOP|LEFT

Here is all the code related to the Toast (it's within the mainActivity). The main (and only) layout is a LinearLayout although I don't think that's relevant since it's not a custom toast. Toast taux = Toast.makeText(getApplicationContext(), "test",…
Arnau Sanz
  • 33
  • 1
  • 4
1
vote
1 answer

alternative to MANAGE_EXTERNAL_STORAGE for Android 10

I would like my flutter app to have write-access to the whole external storage (/sdcard/Android in particular) and I found the documentation of ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION which seems like exactly what I would need, as it also grants…
1
vote
0 answers

Android minSdkVersion opposing dependancies

I am performing Android development for a specific remote research trial (not to be distributed, single use case). The required dependencies (DJI and Parrot hardware SDKs) are only compatible with specific API's. One has a min API of 19, the other…
1
vote
0 answers

API level 30 gives language not supported error code for Hindi

I implement the text to speech which is working fine till android API level 28 for Hindi but in Android API level 30 it returns the error code -2 (Language not support). private void setTextTospeech() { textToSpeech = new TextToSpeech(mContext,…
1
vote
0 answers

getting some errors and a crash after changing API level on Android Studio

recently i have bought a source code and applying some changes and tested the app, everything worked perfect! except that i don't actually get notifications on the app the whole time but i will find a solution for that later... after trying to…
1
vote
1 answer

Create App-Specific folder in External Storage in Android Q

I want to create an app-specific folder in Internal Storage similar to Whatsapp, Telegram, etc. Apps whose target SDK is 29, Environment.getExternalStorageDirectory has been deprecated. Now, Android does allow to create such a folder using legacy…
1
vote
1 answer

How to find which API level an Android class has been introduced?

I created a new Android project, targeting API 15 and using androidx. The autogenerated Hello world is: package com.example.myapplication; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends…
Davide
  • 17,098
  • 11
  • 52
  • 68
1
vote
2 answers

Can't access external storage in API-29

The following code works well in the lower API-29. But when using API-29, it gives access denied to external storage error. public void persistFile(byte[] bytes, String path, String fileName) throws IOException { OutputStream fOut = null; …
1
vote
3 answers

How do I receive live API data updates on Android?

I am working on receiving live API data updates on my android app. I am against polling as it drains battery and not in favor of anything that requires to check data updates manually every 5 mins or so. Is there an easier way to achieve this without…
user11455292
1
vote
0 answers

Data usage calculation in Android NetworkStats class

I saw Android has NetworkStats.Bucket class from which we can query the network data usage of an app. getRxBytes() and getRxPackets() return the number of bytes and packets received. I'm curious is there any delay when updating the data…
Fred Wang
  • 11
  • 1
1
vote
1 answer

After updating to Target API 26 few phone are not supported any more

After updating to TARGET API 26 few device (Mainly Sony Xperia eg. Xperia XA F3115) showing this error : Doesn't support framework version 26 and onwards How can I support this device?
A J
  • 4,542
  • 5
  • 50
  • 80
1
vote
1 answer

Unable to instantiate receiver com.parse.ParseBroadcastReceiver: java.lang.ClassNotFoundExceptio in API 27

I have problem with ParseBroadcastReceiver. Everything worked OK, till we went to API 27. And now we are getting java.lang.RuntimeException, and app crashes every time when goes to sleep and after awakening a device. Bellow is my code. And in my …
ZoeDeep
  • 21
  • 3
1
vote
1 answer

how to add sdk version in a react native project already created?

I created a project a month ago and I'm working on, I want to know: which sdk version is in my project how to add other previous version as lollipop (API 21), marshmallow (API 23), nougat (API 24), oreo (API 26)... if it's possible to add theme,…
zedArt
  • 487
  • 1
  • 10
  • 27
1
vote
2 answers

Android Travis CI Error: Invalid --abi armeabi-v7a for the selected target

My Travis build keeps failing because apparently it does not recognize the arm abi. Here's my full .travis.yml: language: android sudo: required env: global: - ANDROID_API_LEVEL=28 - ANDROID_BUILD_TOOLS_VERSION=28.0.3 -…
Fawwaz Yusran
  • 1,260
  • 2
  • 19
  • 36