Blog skyhook logo What is a SDK and an API?

Sep 14, 2020 2:57:54 PM

What is a SDK and an API?

Posted by Oleg Kamenetsky

Read All Posts

All mobile applications utilize several APIs (Application Programming Interfaces) and SDKs (Software Development Kits) to increase standardizations and add new useful features. These software packages allow for the addition of unique capabilities that most developers would not otherwise be able to deploy without many dedicated resources. With this being said, there is often confusion between what an SDK and API are, and why an app would want to integrate either of these third-party software options. In this post, we will define what APIs and SDKs are and discuss the differences between them.
 
What is an API?
Broadly speaking, an Application Programming Interface (API) is a set of subroutine definitions, communication protocols, and tools for building software. In general terms, it is a set of clearly defined methods of communication among various components.
 
There are two main types of APIs, server-to-server or client-to-server, and component-to-component. Server-to-server and client-to-server APIs are commonly a stateless interface to a remote server to set or get data. Typically, these types of APIs use a “RESTful” (representational state) protocol which requires them to be “stateless”. Stateless protocols require that any call to the API be completely independent from any past or future calls to the API. The API defines a communication protocol and “expected behavior” that allows a client to make requests and receive responses to and from a server. It is the developer's responsibility to integrate an API into their solution and use the API correctly. Component-to-component APIs can act a bit differently. These APIs allow different software packages to communicate on the same device and are not communicating with an external server or device. A good example of this would be Android’s set of APIs.
 
APIs work on all operating systems and are commonly used on IoT devices and for device tracking & management platforms. This makes them a great solution for customers that use proprietary operating systems and protocols as well as end-to-end vertical solution providers.
 
Skyhook offers an API as one of four flexible integration options to access its Precision Location software. When utilizing this location API, the developer is required to source the Wi-Fi, GPS, and cellular data, and then implement the API request according the the specifications outlined.
 
What is an SDK?
A Software Development Kit (SDK) is commonly defined as a set of tools that can be used to create and develop applications. In general, an SDK refers to a full-suite software module that includes everything developers need for a specific module within an app. They are often compared to a code library, which is a collection of non-volatile resources, used by computer programs, often for software development. They often “wrap” (fully or partially implement) an API and utilize the API’s communication protocols in the appropriate and intended manner. They include examples, documentation and, the methodology necessary to perform specific functions.
 
For example, Skyhook’s Precision Location SDK provides all the tools and documentation needed to perform highly accurate geo-positioning on a mobile device using the Android operating system. The app developer simply needs to load, or dynamically pull, the SDK library into their development environment and use the available interfaces to utilize all the capabilities Skyhook provides. No extra code is needed to source the Wi-Fi, GPS, or cellular data to calculate an accurate position - this is all handled by the SDK.
 
Additional benefits of Skyhook’s SDK include location smoothing, a fast time-to-fix, MAC address collapsing, stationary detection, offline location, and power optimization. See how each of these features can add value to connected devices:
  • Location Smoothing – Algorithms that use historic location data and patterns to inform device locations in the future.
  • MAC Address Collapsing – Intelligent filtering to detect multiple MAC addresses associated with one router. This helps evenly weight all access points used for location, without creating a bias towards a particular access point.
  • Stationary Detection – Patented method for determining if a connected device is stationary, through measuring the Doppler frequency of received satellite signals.
  • Offline Location – Determine device location, even when offline, by collecting a token that gets replayed once devices are back online.
  • Power Optimization – Technology to minimize the number of access points that need to be scanned to yield accurate location results and reducing the time it takes to complete scans for access points.
 
The SDK is a great solution for applications across smart and feature phones, desktops, laptops, wearable devices, cameras, and point-of-sale devices. It has broad integration options across operating systems as well, with compatibility including custom variants of the Android operating system, Linux, Windows, MacOS, and Raspberry Pi.
 
Why use an API?
APIs are typically much lighter weight than SDKs since a full library does not need to be integrated into the app or the APIs are native to the development platform. APIs are useful when you only need one or two specific functions of an SDK and a fully integrated experience is not needed. Developers should keep in mind that implementing an API often requires more programming upfront as they are less “plug-and-play” than SDKs. Finally, APIs are also useful for applications where a codebase is programed on atypical platforms.
 
Why use an SDK?
SDKs provide developers with an array of tools needed to provide end-users of an app a unique and standardized interface. Developers also don’t need to reinvent the wheel when in comes to standard app features, such as location, data storage, geofencing, user authorization, etc. SDKs have a set of robust functionality -- error handling, consistent performance, code reuse -- that takes a lot of the complexity away for software developers. SDKs also ensure that any API provided is implemented correctly, reducing the headache that could be associated with implementing an API. The SDK often goes further and provides enhanced features on top of APIs that allow for improved user experiences within your app. Finally, SDKs also allow for easier upgrade paths and handling of deprecations for certain lower-level APIs.
 

The Bottom Line

No matter the type of app you are creating, SDKs and APIs provide vital services for ease in development and time to market. They provide functionality that improves user experience and common packages to address typical use cases.
 
Skyhook provides solutions that will accurately locate connected devices via the Precision Location SDK and API, and geofencing solutions via the Context SDK, all in a battery-efficient manner. Check out all of our available integration options here or learn more on the Skyhook website.
 

Devices-Apps-Skyhook-Solution-Sheet