Application Programming Interface (APIs)

Let’s look at APIs or an Application programming interface.

This one is very interesting or at least I hope it will be. It certainly was for me when I was learning about GCam, one of the things that prompted me to opt for Xiaomi Redmi Note 7 well over 3 years ago. Okay so let’s get started…


What is an Application programming interface (API)?

An Application Programming Interface is an intermediary or middleman that allows two different software or apps to talk to each other.

Let’s visualize here. Think of the relationship between a nail and two pieces of wood.

When you slam a nail down with a hammer into two pieces of anything, it is mostly a permanent arrangement or at least that’s the intention.

Let’s consider the two pieces of wood to be the hardware and the nail as the software that holds them together.

Now if by any chance, you wish to adjust that particular nail or take it out, it is going to be a very annoying thing to do. This is because there’s no way to interact or interface with the nail. You are going to have to pull out the nail which may become twisted, bent, and sometimes useless.

But what if, there was a way to attach two pieces of wood in a way that the “nail” can be put in and removed without stress…

Well, enter a simple screw and a screw hole. Yes, that’s the actual name, I laughed at it too when I checked to confirm.

So with a nail slammed into wood, you cannot easily find any way for another device to interact with the nail.

But with a screw, there’s a groove at the top that will allow it to interact or interface with a device (i.e. screwdriver) that can control it.

The screw and the screwdriver

So let’s look at the definition of an application programming interface again before we go on.

An Application Interface is an intermediary or middleman that allows two different software or apps to talk to each other. It also allows one software to control another one.

So let’s go back to our wood, nail, and screw analogy. When you drive nails into wood, there’s no way to interact with it anymore unless you intend to rip the pieces of wood apart.

But with a screw, there’s a groove that is carefully carved into its head. It could be a plus, minus, or a star with 6 arms.

These grooves that are carved into the screw allow you to interact or interface with and control the screw. You can do this with a screwdriver in a way that a nail will never allow.

That groove that is carved into a screw is an interface or let’s call it an application interface.


Application interfaces and their relationship with operating system software

Many companies build their operating system + Android skins in such a way that only they (and adware) have access to interface with it. You could think of these operating systems (for their phones) as a nail hammered into wood.

Some other manufacturers may leave APIs open for other types of software to interact with and control their OS. These operating systems are like screws that you can interact with.

It is important to note that even when an interface is present, it may only support specific types of software.

Look at it like this…

A star screwdriver would not turn a flat screw. Not at all. Unless of course, you’re like me who is adept at turning knives into screwdrivers.

😂😂😂😂😂

I digress.


APIs on iOS and Android operating systems

On iOS, the only APIs available are the ones that allow them to install apps from the App Store or connect to Apple peripherals (usually).

On Android, there are a lot of APIs that are either on or off, depending on who you decide to buy from.

Our dear Tecno who I love to pick on have APIs for PlayStore, themselves, and possibly adware. Because their ads are beyond annoying.

Xiaomi on MIUI left the camera2api open for other apps to interact with. This is why GCam, an app made for Google Pixel can interact with Xiaomi phones as if it was built for them.


Uses of Application Programming Interface

The purpose of an API – Application Programming Interface – is to abstract away the implementation of the underlying software. This is to ensure that other software can interact with said software without understanding how said software works.

Software A’s API, for example, makes it easy for Software B to interact with it and use some of Software A’s features. It does these without necessarily understanding how software A works, or how software A’s hardware was built.

So the purpose of an API is to allow one software to interact with another software and its ecosystem without needing to fully understand it.

For example, a screwdriver can close (lock) and open two pieces of wood or plastic without having to interact with the wood.

Why? How?

Simple, because the screw that holds the wood or plastic together has an interface that the screwdriver can access, to manipulate the wood or plastic without understanding them.

So Pixel’s GCam doesn’t need to understand Xiaomi phones, but so long as MIUI has an interface for it, it can control the cameras on a Xiaomi device.

So when someone asks, this GCam, why does my phone or X phone not support it? It is simply because there is no way for the GCam to interface or communicate with the software on that phone?

APIs are not for GCam alone. They’re for all software-to-software or even software-to-hardware interactions.

On phones with 32-bit operating system software, there’s no interface for 64-bit apps to connect to. Hence phones like Redmi 9A or 9C cannot run 64-bit apps like eFootball.

When you hear that an app is now supported due to a software update, it possibly means that there’s an API that has been made available for the previously unsupported app to tap into.

Real-life use of APIs

There are APIs for lots of stuff like OTGs, Chromecast/Anycast, Bluetooth, wired headphones, installed apps, and so forth.

Even the ability to be able to use manual camera mode on a phone is granted by an API as well. With that being said, I have yet to see manual or pro mode on some people’s phones to date.

Another analogy

One could also think of an API as an interpreter. If I have an interpreter, I don’t need to understand French to speak to a French person.

The API or interpreter will help me carry my commands across and even tell the person what to do.

Without an interpreter or API, app not installed will usually be the end of the story

Don’t forget the ‘I’ in API stands for Interface. An Interface is simply something that enables you to interact with something else.

And with that, we’ve come to the end of this post. Thank you all for coming.


Please leave a comment if you have any difficulty and remember to: