Android software development


Android software development is the process by which applications are created for devices running the Android operating system. Google states that "Android apps can be written using Kotlin, Java, and C++ languages" using the Android software development kit, while using other languages is also possible. All non-JVM languages, such as Go, JavaScript, C, C++ or assembly, need the help of JVM language code, that may be supplied by tools, likely with restricted API support. Some programming languages and tools allow cross-platform app support. Third party tools, development environments, and language support have also continued to evolve and expand since the initial SDK was released in 2008. The official Android app distribution mechanism to end users is Google Play; it also allows staged gradual app release, as well as distribution of pre-release app versions to testers.

Official development tools

Android SDK

The Android software development kit includes a comprehensive set of development tools. These include a debugger, libraries, a handset emulator based on QEMU, documentation, sample code, and tutorials. Currently supported development platforms include computers running Linux, Mac OS X 10.5.8 or later, and Windows 7 or later., the SDK is not available on Android itself, but software development is possible by using specialized Android applications.
Until around the end of 2014, the officially-supported integrated development environment was Eclipse using the Android Development Tools Plugin, though IntelliJ IDEA IDE fully supports Android development out of the box, and NetBeans IDE also supports Android development via a plugin. As of 2015, Android Studio, made by Google and powered by IntelliJ, is the official IDE; however, developers are free to use others, but Google made it clear that ADT was officially deprecated since the end of 2015 to focus on Android Studio as the official Android IDE. Additionally, developers may use any text editor to edit Java and XML files, then use command line tools to create, build and debug Android applications as well as control attached Android devices.
Enhancements to Android's SDK go hand-in-hand with the overall Android platform development. The SDK also supports older versions of the Android platform in case developers wish to target their applications at older devices. Development tools are downloadable components, so after one has downloaded the latest version and platform, older platforms and tools can also be downloaded for compatibility testing.
Android applications are packaged in.apk format and stored under /data/app folder on the Android OS. APK package contains.dex files, resource files, etc. Firebase is the newest product of Google acquired in 2011 for making Android development easy for developers. Firebase has 19 products ranging from Cloud Firestore to Dynamic Links.

Android SDK Platform Tools

The Android SDK Platform Tools are a separately downloadable subset of the full SDK, consisting of command-line tools such as adb and fastboot.

Android Debug Bridge (ADB)

The Android Debug Bridge is a tool to run commands on a connected Android device. The adbd daemon runs on the device, and the adb client starts a background server to multiplex commands sent to devices. In addition to the command-line interface, numerous graphical user interfaces exist to control adb.
The format for issuing commands is typically:
adb
where -d is the option for specifying the single USB-attached device,
-e for the single running Android emulator on the computer,
-s for specifying a USB-attached device by its unique serial number.
If there is only one attached device or running emulator, these options are not necessary.
For example, Android applications can be saved by the command backup to a file,
whose name is backup.ab by default.
In a security issue reported in March 2011, ADB was targeted as a vector to attempt to install a rootkit on connected phones using a "resource exhaustion attack".

Fastboot

Fastboot is a protocol and it has a tool with the same name included with the Android SDK package used primarily to modify the flash filesystem via a USB connection from host computer. It requires that the device be started in a boot loader or Secondary Program Loader mode, in which only the most basic hardware initialization is performed. After enabling the protocol on the device itself, it will accept a specific set of commands sent to it via USB using a command line. Some of the most commonly used fastboot commands include:
  • flash rewrites a partition with a binary image stored on the host computer.
  • erase erases a specific partition.
  • reboot reboots the device into either the main operating system, the system recovery partition or back into its boot loader.
  • devices displays a list of all devices connected to the host computer.
  • format formats a specific partition; the file system of the partition must be recognized by the device.

    Android NDK

Code written in C/C++ can be compiled to ARM, or x86 native code using the Android Native Development Kit. The NDK uses the Clang compiler to compile C/C++. GCC was included until NDK r17, but removed in r18 in 2018.
Native libraries can be called from Java code running under the Android Runtime using System.loadLibrary, part of the standard Android Java classes.
Command-line tools can be compiled with the NDK and installed using adb.
Android uses Bionic as its C library, and the LLVM libc++ as its C++ Standard Library. The NDK also includes a variety of other APIs: zlib compression, OpenGL ES or Vulkan graphics, OpenSL ES audio, and various Android-specific APIs for things like logging, access to cameras, or accelerating neural networks.
The NDK includes support for CMake and its own ndk-build. Android Studio supports running either of these from Gradle. Other third-party tools allow integrating the NDK into Eclipse and Visual Studio.
For CPU profiling, the NDK also includes simpleperf which is similar to the Linux perf tool, but with better support for Android and specifically for mixed Java/C++ stacks.

Android Open Accessory Development Kit

The Android 3.1 platform introduces Android Open Accessory support, which allows external USB hardware to interact with an Android-powered device in a special "accessory" mode. When an Android-powered device is in accessory mode, the connected accessory acts as the USB host and the Android-powered device acts as the USB device. Android USB accessories are specifically designed to attach to Android-powered devices and adhere to a simple protocol that allows them to detect Android-powered devices that support accessory mode.

External hardware development

Development tools intended to help an Android device interact with external electronics include IOIO, Android Open Accessory Development Kit, Microbridge, Triggertrap, etc.

Android Developer Challenge

The Android Developer Challenge was a competition to find the most innovative application for Android. Google offered prizes totaling 10 million US dollars, distributed between ADC I and ADC II. ADC I accepted submissions from January 2 to April 14, 2008. The 50 most promising entries, announced on May 12, 2008, each received a $25,000 award to further development. It ended in early September with the announcement of ten teams that received $275,000 each, and ten teams that received $100,000 each.
ADC II was announced on May 27, 2009. The first round of the ADC II closed on October 6, 2009. The first-round winners of ADC II comprising the top 200 applications were announced on November 5, 2009. Voting for the second round also opened on the same day and ended on November 25. Google announced the top winners of ADC II on November 30, with SweetDreams, What the Doodle!? and WaveSecure being nominated the overall winners of the challenge.

Community-based distributions

There is a community of open-source enthusiasts that build and share Android-based distributions with a number of customizations and additional features, such as FLAC lossless audio support and the ability to store downloaded applications on the microSD card. This usually involves rooting the device. Rooting allows users root access to the operating system, enabling full control of the phone. Rooting has several disadvantages as well, including increased risk of hacking, high chances of bricking, losing warranty, increased virus attack risks, etc. It is also possible to install custom firmware, although the device's boot loader must also be unlocked. Custom firmware allows users of older phones to use applications available only on newer releases.
Those firmware packages are updated frequently, incorporate elements of Android functionality that haven't yet been officially released within a carrier-sanctioned firmware, and tend to have fewer limitations. CyanogenMod and OMFGB are examples of such firmware.
On September 24, 2009, Google issued a cease and desist letter to the modder Cyanogen, citing issues with the re-distribution of Google's closed-source applications within the custom firmware. Even though most of Android OS is open source, phones come packaged with closed-source Google applications for functionality such as the Google Play and GPS navigation. Google has asserted that these applications can only be provided through approved distribution channels by licensed distributors. Cyanogen complied with Google's license and continued to distribute its mod without the proprietary software. It provided a method to backup licensed Google applications during the mod's install process and restore them when the process is complete.

Java standards

Obstacles to development include the fact that Android does not use established Java standards, that is, Java SE and ME. This prevents compatibility between Java applications written for those platforms and those written for the Android platform. Android reuses the Java language syntax and semantics, but it does not provide the full class libraries and APIs bundled with Java SE or ME. However, there are multiple tools in the market from companies such as Myriad Group and UpOnTek that provide Java ME to Android conversion services.
Android provides its own GUI classes, and does not provide Java AWT, Swing or JavaFX. It does not support the full Java Beans API.

History and market share

Android was created by the Open Handset Alliance, which is led by Google. The early feedback on developing applications for the Android platform was mixed. Issues cited include bugs, lack of documentation, inadequate QA infrastructure, and no public issue-tracking system. In December 2007, MergeLab mobile startup founder Adam MacBeth stated, "Functionality is not there, is poorly documented or just doesn't work... It's clearly not ready for prime time." Despite this, Android-targeted applications began to appear the week after the platform was announced. The first publicly available application was the Snake game.
A preview release of the Android SDK was released on November 12, 2007. On July 15, 2008, the Android Developer Challenge Team accidentally sent an email to all entrants in the Android Developer Challenge announcing that a new release of the SDK was available in a "private" download area. The email was intended for winners of the first round of the Android Developer Challenge. The revelation that Google was supplying new SDK releases to some developers and not others led to widely reported frustration within the Android developer community at the time.
On August 18, 2008, the Android 0.9 SDK beta was released. This release provided an updated and extended API, improved development tools and an updated design for the home screen. Detailed instructions for upgrading are available to those already working with an earlier release. On September 23, 2008, the Android 1.0 SDK was released. According to the release notes, it included "mainly bug fixes, although some smaller features were added." It also included several API changes from the 0.9 version. Multiple versions have been released since it was developed.
On December 5, 2008, Google announced the first Android Dev Phone, a SIM-unlocked and hardware-unlocked device that is designed for advanced developers. It was a modified version of HTC's Dream phone. While developers can use regular consumer devices to test and use their applications, some developers may choose a dedicated unlocked or no-contract device.
, more than one million applications have been developed for Android, with over 25 billion downloads. A June 2011 research indicated that over 67% of mobile developers used the platform, at the time of publication. Android smartphone shipments are forecast to exceed 1.2 billion units in 2018 with an 85% market share.