If you remember my previous post where we picked the API for our project then you might be wondering what that is and why does it matter? In this post I will go over that.

API or Application Programming Interface is essentially how your app communicates with the Android operating system. API is what allows you to build your apps so they can run on android devices. Now as with everything over time new features are developed and old features refined and sometimes products are completely revamped. The first version of Android was released in 2008 which is over 8 years ago and over time a lot has changed. The latest version is called “Nougat” and was released in 2016.

Android architecture

As you can see Android is a complex system that’s built on top of a Linux Kernel.

Devices running older versions of android often don’t support the latest features found in latest version of the operating systems and if you develop and app in 2016 using the latest API (24 as of 2016) then you might find that your app either doesn’t run or breaks down in older versions of android.

So, How do you ensure that your app runs on all android devices out there?

Remember when you start a new project in Android Studio it actually asks you to pick minimum version of SDK that you want to support for your app and just down below it also gives you an estimate of android devices active on Google Play store that support that version of API

As you can see API 16 means that your app will run on approximately 95% of android devices active on Google Play store. Remember there might be some devices that don’t use Google play store such as Amazon’s version of Android that runs on Kindles.

The number keeps going down the higher you go with the latest version running(API 24) on less than 1% of devices.

percentage of active devices

 

In the end it really depends on your target audience and objectives of your app that helps you decide what version of API you should support at minimum for your app. In my tutorials I will be using API16 as it seems to be the best option for now.

What features are available in latest APIs that I’m missing on?

You will have to go through android docs to find all the details about latest APIs but some of the biggest to me seems to be support for Material Design starting with API 21. It can be mitigated to an extent by importing libraries for RecyclerView but you still lose tons of features. I will discuss material design and recyclerview in later articles.

Above is a list of some of the API versions and their respective android platforms. You can check out the official docs to see the major improvements and changes in these apis by clicking here and then clicking on platform highlights for your intended api.

 

What about Android Wear, TV and other devices?

If you are developing apps for android based televisions or android wear and similar devices you will find that they don’t always run on the same APIs. As you can see in the image below, some of them don’t support the API 16  and some such as Google Glass has its own API. I won’t be covering these non-phone or tablet devices for now.

So, there you have it a short intro to Android API. Let me know your comments or concerns via the form below.

 

 

Credit

Android Architecture: https://developer.android.com/guide/platform/index.html

 

Leave a Reply

Your email address will not be published. Required fields are marked *