A mobile developer’s job is not an easy one. Ensuring their killer application is available to as many people on the planet as possible may mean developing four, five or possibly more versions of the application to enable it to run on the full variety of mobile platforms. Android and iOS dominate the market, but don’t forget about Windows Phone, BlackBerry 10 and Tizen. In some sectors and geographies, platforms with a smaller global market share have a disproportionately larger significance.

So it’s no surprise that developers, especially those who work for smaller companies or are a “one-person company,” are always on the lookout for tools and technologies that increase productivity and save work, time and money (not necessarily in that order!).

Hybrid Mobile Apps

Hybrid mobile applications is a specific category requiring a developer to write source code in a platform agnostic way and through some SDK magic, build and package it so the code will work on a range of different target platforms. That’s right. You develop one version of your application only but it will work on iOS, Android and if you really want it to, quite possibly Windows Phone and BlackBerry 10 too. On the face of it, this is precisely the alchemy that developers have been looking for.

But why “hybrid?” To understand this, we need to peek under the covers to find out how hybrid mobile apps work and how they achieve their cross-platform capability.

Native Applications vs. Web Applications

This is one of those topics to argue about at the pub…or café. Actually, the location doesn’t matter, it’s a fine topic for a good old debate anywhere, any time!

Platforms, mobile or otherwise, typically include a wide range of APIs which give application developers access to their features and capabilities, such as user interface components, persistent data storage, networking, GPS and of course, Bluetooth. Direct access to those APIs will be available via one or more programming languages. Android developers typically use Java and iOS developers most likely use Swift.

SDKs allow native app developers to build and package their application and then have it hosted in an app store for users to discover, download and install onto their devices. 

Web browser applications, on the other hand, are downloaded by the browser from a remote server whenever they are accessed by the user. They consist of a variety of “content” types which typically include HTML, CSS and JavaScript. The browser renders the HTML, applies the styling rules in the CSS and executes JavaScript functions as required. Web apps execute inside the browser’s “sandbox” and there are limits regarding how they can interact with the local device and its features. HTML5 and JavaScript are progressing all the time and there’s a great deal of power available to the web developer these days, but there are still limitations which the native application developer does not have to accept. There’s a degree of support for Bluetooth coming to the browser itself too (see the ‘Progressive Bluetooth Web Apps’ webinar here).

Application stores are a key element in today’s mobile platform ecosystems and one of the primary mechanisms by which developers make money from their apps. They’re designed for native applications which get downloaded from the store and installed on a device. Web applications, as I’ve described, cannot be hosted by an app store.

So, there are limitations regarding what you can do on a mobile device with web applications. One key limitation being you cannot have them hosted in an app store. That’s food for thought.

Where the web application developer can win hands down against the native application developer though, is that their applications are “cross-platform” applications. The application should be usable on any device with a sufficiently up-to-date browser on it, regardless of whether that device runs iOS, Android, Windows 10 and so on.

There are some shades of grey here and the stark distinction I’m making isn’t necessarily the whole story, but simply a way of positioning the two approaches. Allow me to elaborate.

Enter the Hybrid Mobile Application

This, as the name suggests, is a hybrid approach which attempts to give the application developer the best of both worlds. Hybrid mobile apps are developed using web technologies, so they’re cross-platform. They have access to native platform features like sensors and so on. They are installed on the mobile device, just like a native application, and can be hosted within one of the app stores.

So how do hybrid mobile apps work and what about Bluetooth® support?

It’s All in the WebView

In the final analysis, hybrid mobile apps are a special type of native application, supported by an SDK which lets you “go cross-platform” and a series of APIs which usually get packaged in components often called “plug-ins.” The basic architecture of a hybrid mobile application is shown below, and as you can see, the secret sauce is something called a WebView component.

 

The WebView component is a native GUI component which can be included in an application’s user interface and its magical property is the ability to render web content, packaged locally or downloaded from a remote server. It’s like a mini, embeddable web browser which can render HTML, process CSS and execute JavaScript, all inside an otherwise standard native application. iOS, Android, and others have a component like this. It’s a multi-platform, architectural common denominator which the hybrid mobile approach exploits.

Writing Hybrid Mobile Apps

Hybrid mobile application developers only need to worry about authoring the HTML, CSS and JavaScript code which the WebView handles. Everything else is provided or generated by the hybrid mobile SDK for a specified target platform. You write your WebView HTML/CSS/JS content in a platform-independent way and then use the SDK to generate an installable application for each of the platforms you wish to support. You end up with an apk file for Android, an ipa for iOS and so on, each wrapping around the same web content that you wrote. Once…for each platform.

Hybrid Mobile SDKs

There are quite a few SDKs for hybrid mobile application developers to choose from. Apache Cordova is free and open source and it’s what I use if I decide to produce a hybrid mobile application. But there are other offerings too (some of them based on Apache Cordova as it happens). Adobe Phonegap is perhaps the best known but Ionic has a growing fan-base.

What about Bluetooth?

A fine question. Apache Cordova and Phonegap can use the same plugins and there are several Bluetooth® plugins to choose from, spanning both GAP peripheral and GAP central capabilities.

In part 2, I’ll explore how you can create Bluetooth® enabled applications that are cross-platform and can be published in app stores using Apache Cordova.

Robust Indoor Distance Estimation Algorithms for Bluetooth® Channel Sounding

Bluetooth Channel Sounding is a powerful feature setting a clear and solid foundation for…

What’s New with Bluetooth® Technology: Channel Sounding, Upcoming Features, and Key Technology Trends

With over 5 billion devices shipping each year, Bluetooth technology is the most widely…

Bluetooth® Core 6.0: What's New In The Latest Bluetooth Release?

Bluetooth technology is constantly growing, not only enhancing existing applications but also enabling entirely…

Bluetooth PAwR in a Large-Scale Test Network

In the ever-evolving, dynamic landscape of Bluetooth-connected smart devices, efficient interconnection and reliable communication…

Bluetooth Channel Sounding: How It Works and What It MeansBluetoothチャネルサウンディング:その仕組みと意義

Bluetooth® Channel Sounding is a new secure, fine-ranging capability that promises to enhance the…

Receiver Blocking Resilience Test Suite

This Test Suite tests the receiver blocking resilience of a Bluetooth implementation. It is…

Now Available: New Version of the Bluetooth® Core SpecificationBluetoothコア仕様の新バージョンがリリース

Thanks to the dedication and hard work of the Bluetooth community, Bluetooth® technology is…

Channel Sounding: Technical Overview (Pt 2)

In Part 1 we introduced the new Bluetooth distance measurement innovation known as Channel…

Unlocking Healthcare Potential: SPP and Bluetooth® LE for Medical Devices

The Serial Port Profile (SPP) has long been a well-known standard for wireless serial…

The Bluetooth Roadmap: Bluetooth Specifications in ProgressBluetoothのロードマップ:策定中のBluetooth仕様

Though not commonly known among many consumers, Bluetooth® technology is constantly and consistently advancing to…

Bluetooth® Channel Sounding: A Technical Overview

This paper provides a detailed technical overview of Bluetooth® Channel Sounding, a secure fine ranging…

The Bluetooth® Mesh Primer

An introduction and explanation of important Bluetooth® Mesh concepts.

Enabling the Digital Transformation of Industrial IoT with Bluetooth®

The Industrial IoT is a digital transformation process for enterprises offering them compelling abilities…

Bluetooth® Technology for Linux Developers

Learn how to use the interprocess communication system D-Bus and the BlueZ APIs to create Bluetooth applications for Linux computers.

Designing and Developing Bluetooth® Internet Gateways

Learn about Bluetooth® internet gateways, how to make them secure and scalable, and design and implement your own...

The Bluetooth LE Security Study Guide

Learn about fundamental security concepts, the security features of Bluetooth Low Energy, and gain some hands-on experience using those features in device code.

 Get Help