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

Alternative of stopListening() method of SpeechRecognizer class for Android API < 8

Is there any alternative to stopListening() method for API < 8 since this method was included in API level 8?
0
votes
1 answer

Google Play invisible app for certain smartphone

I'm new to Android developing and I'm facing a strange issue: I published my app on google play with a minimum api level of 18 (android 4.4). I tested my app with many android version and run fine except one device. A Chinese smartphone (cubot P9)…
pickit123
  • 1
  • 1
0
votes
1 answer

Does respect different api levels such as /layout-v19/layout.xml vs /layout/layout.xml?

I have a layout where just one part of it is api level dependent (it uses vectors) and I need to handle it differently for api-19. I changed the layout to handle those using app:srcCompat:"@drawable/left_arrow_vector" which works to make 19 not…
user
  • 29
  • 7
0
votes
0 answers

How to submit data to server from android app with token and body?

I am using retrofit for api calling.I need to send data to server from my application.The process is the server takes authentication(Header) token and the collection of data (Body) as parameter.I have coded the following part but it does not send…
Sakhawat Hossain
  • 454
  • 8
  • 23
0
votes
0 answers

Pressing home button finishes Activity on Android API 21 on Android emulator

I've checked that if I press home button on that API, the current activity finishes, when I don't want that to happen. I've already checked in API 22 and API 23 that if home button is pressed, on these APIs, activity is not finished and can be…
user2638180
  • 1,013
  • 16
  • 37
0
votes
1 answer

How to color the EditText focus color for API < 21?

I have EditTexts and they color the bottom line in primary color as you can see here I want to leave it black, so I set in my layout for the EditText: android:backgroundTint="@android:color/black" This works nice, but I have minSDK set to 19. So I…
Tranquillo
  • 235
  • 2
  • 13
0
votes
1 answer

Uncaught SyntaxError: Unexpected end of input - JavaScript injected code into WebView (loadUrl) doesn't work in Android 7 but it does in Android 4

My Android app features an activity where a script is injected into a WebView after a XHTML page is loaded from disk (not the internet). The app was originally targeted at API level 12 and compiled to the same SDK level, but I had to update it and…
0
votes
2 answers

How to add API level into NDK?

IDE asks me for android-14 for NDK. How could I get it ? I have r18b version of NDK. Here is what I have in platforms directory:
Andy D
  • 125
  • 13
0
votes
0 answers

Programmatically adding custom radio button not working in Android API 22

I would like to use custom radio buttons in an Android app that must target API 22 and later. I'd like to have something like this When complete the source for the radio button text and values will come from an SQLite database and therefore I…
0
votes
0 answers

Removal of the Crypto provider - Android P API 28

I'm using the Crypto provider in my application. I know that it is deprecated in Android N. However I used the solution from this question and it was working perfectly fine. Now in Android P (API 28), they've completely removed it details here and…
Amrut
  • 2,655
  • 3
  • 24
  • 44
0
votes
2 answers

How to fetch Json in Android using retrofit 2 as shown in below code?

api url: "http://btownmedia.com/?json=get_category_posts&slug=flex-print&status=publish" my json is shown below: { "status": "ok", "count": 1, "pages": 1, "category": { "id": 44, "slug": "flex-print", "title": "Flex Print", …
0
votes
1 answer

Unable to use Consumer of java functional interfaces in android app API level 22

I am new to android development. I am targeting API level 22 and with the following code, the app crashes: Consumer onError = new Consumer(){ public void accept(String t){ } } I tried with a custom class implementing this…
Babu James
  • 2,740
  • 4
  • 33
  • 50
0
votes
1 answer

How to check if an activity is the last one in the activity stack on API 21+

My question is the same as this one, but it is old and the accepted answer uses depreciated permissions and values. I would like an updated answer that works above API 21. I need to override a home-screen return button action under certain…
Mr.Drew
  • 939
  • 2
  • 9
  • 30
0
votes
1 answer

Android Api specific url defaults

So I'm running a json request in my android project that contains something like this for url strings to images "http:\/\/s2.dmcdn.net\/qhQ5Y.jpg" On my AS AVD API 25 it auto deletes the "\" character and loads the image properly (using picasso for…
0
votes
3 answers

java.lang.SecurityException: "passive" location provider requires ACCESS_FINE_LOCATION permission on API level 26

I have android application and we have recently shifted to API level 26 from 22. I have cheked if the app has one of the ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission. One issue that I found and not able to solve is that it gives an…