Android software development#NDK
{{short description|Process of writing software for Android operating system}}
{{Use mdy dates|date=November 2014}}
File:Nexus 4.png, part of the Google Nexus series, a line of "developer-friendly" devices{{cite news|title=Editorial: Why You Should Go Nexus|url=http://droidlessons.com/why-you-should-go-nexus-opinion-2/|access-date=August 22, 2023|newspaper=Droid Lessons|date=September 24, 2023
|author=Syed H|archive-url=https://web.archive.org/web/20170218000749/http://droidlessons.com/why-you-should-go-nexus-opinion-2/|archive-date=February 18, 2017|url-status=dead}}]]
Android software development is the process by which applications are created for devices running the Android mobile operating system. Google states that{{Cite web|url=https://developer.android.com/guide/components/fundamentals|title=Application Fundamentals|website=Android Developers}} "Android apps can be written using Kotlin, Java, and C++ languages" using the Android software development kit (SDK), while using other languages is also possible. All non-Java virtual machine (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 (i.e. for both Android and iOS). 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
The Android software development kit (SDK) includes a comprehensive set of development 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
.
{{cite journal | last = Modesti | first = Paolo | date = March 2021 | title = A Script-Based Approach for Teaching and Assessing Android Application Development | url = https://doi.org/10.1145/3427593 | journal = ACM Transactions on Computing Education | volume = 21 | issue = 1 | pages = 1–24 | doi = 10.1145/3427593 | access-date = May 8, 2022}} The Android Debug Bridge (ADB) is a tool to run commands on a connected Android device. Fastboot is a protocol used for flashing filesystems. Code written in C/C++ can be compiled to ARM, or x86 native code (or their 64-bit variants) using the Android Native Development Kit (NDK).
=Android Open Accessory Development Kit=
The Android 3.1 platform (also backported to Android 2.3.4) introduces Android Open Accessory support, which allows external USB hardware (an Android USB accessory) 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 (powers the bus and enumerates devices) 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 (Android accessory protocol) that allows them to detect Android-powered devices that support accessory mode.{{cite web|url=https://developer.android.com/guide |title= Android Developers guides
|publisher=Developer.android.com |access-date=April 17, 2021}}
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 emulators and subsystems
Android Developer Challenge
{{Main article|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.{{cite web |url = http://android-developers.blogspot.com/2008/05/top-50-applications.html |work = Android Developers Blog |title = The Top 50 Applications |first = Jason |last = Chen |date = May 12, 2008 |access-date = September 4, 2009| archive-url= https://web.archive.org/web/20090925051155/http://android-developers.blogspot.com/2008/05/top-50-applications.html| archive-date= September 25, 2009 | url-status= live}}{{cite news |url = http://www.linuxdevices.com/news/NS3168326017.html |title = Android Developer Challenge announces first-round winners |work = Linux for Devices |first = Eric |last = Brown |date = May 13, 2008 |url-status = dead |archive-url = https://web.archive.org/web/20080514204010/http://www.linuxdevices.com/news/NS3168326017.html |archive-date = May 14, 2008 |df = mdy-all }} It ended in early September with the announcement of ten teams that received $275,000 each, and ten teams that received $100,000 each.{{cite web |url=https://code.google.com/android/adc/adc_gallery/ |title=ADC I Top 50 Gallery |access-date=May 19, 2009 |work=Android Developer Challenge}}
ADC II was announced on May 27, 2009.{{cite web |url=https://code.google.com/android/adc/ |title=Android Developer Challenge |access-date=January 11, 2008 |work=Google Code}} The first round of the ADC II closed on October 6, 2009.{{cite web |url = http://android-developers.blogspot.com/2009/10/adc-2-round-1-scoring-complete.html |title = ADC 2 Round 1 Scoring Complete |work = Android Developers Blog |first = Eric |last = Chu |date = October 6, 2009 |access-date =November 3, 2009| archive-url= https://web.archive.org/web/20091101174228/http://android-developers.blogspot.com/2009/10/adc-2-round-1-scoring-complete.html| archive-date= November 1, 2009 | url-status= live}} 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.{{cite web |url = https://code.google.com/android/adc/gallery_winners.html |title = ADC 2 Overall Winners |work = Android Developer Challenge |access-date =December 5, 2010| archive-url= https://web.archive.org/web/20110104052927/http://code.google.com/android/adc/gallery_winners.html| archive-date= January 4, 2011 | url-status= live}}{{cite web |url = http://www.businessweek.com/the_thread/techbeat/archives/2009/11/android_develop_2.html |archive-url = https://web.archive.org/web/20091204154635/http://www.businessweek.com/the_thread/techbeat/archives/2009/11/android_develop_2.html |url-status = dead |archive-date = December 4, 2009 |title = Android Developer Challenge 2 Winners Announced |work = BusinessWeek |first = Olga |last = Kharif |date = November 30, 2009 |access-date =December 5, 2010}}
Community-based distributions
{{See also|List of custom Android distributions}}
There is a community of open source enthusiasts that build and share Android-based distributions (i.e. firmware) 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.{{cite web |url=http://forum.xda-developers.com/forumdisplay.php?f=448 |work=xda-developers forum |title=Dream android development |access-date=September 11, 2009}} 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.{{cite web |url=http://unbrick.itcse.com/rooting-advantages-disadvantages/ |work=ITCSE forum |title=Rooting: Advantages and Disadvantages |access-date=September 21, 2013 |archive-url=https://web.archive.org/web/20141129085147/http://unbrick.itcse.com/rooting-advantages-disadvantages/ |archive-date=November 29, 2014 |url-status=dead }} 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.{{cite web |url=http://voltmobileandtech.com/blog/ |title=Android 2.1 from Motorola Droid Ported to G1 |work=Volt Mobile |date=March 10, 2010 |access-date=May 13, 2011 |archive-url=https://web.archive.org/web/20110531222919/http://voltmobileandtech.com/blog/ |archive-date=May 31, 2011 |url-status=dead }}
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{{cite web |url = http://androidandme.com/2009/09/hacks/cyanogenmod-in-trouble/ |title = CyanogenMod in trouble? |work = Android and me |first = Taylor |last = Wimberly |date = September 24, 2009 |access-date = September 26, 2009| archive-url= https://web.archive.org/web/20091003165002/http://androidandme.com/2009/09/hacks/cyanogenmod-in-trouble/| archive-date= October 3, 2009 | url-status= live}} to the modder Cyanogen, citing issues with the re-distribution of Google's closed-source applications{{cite web |url= http://android-developers.blogspot.com/2009/09/note-on-google-apps-for-android.html |title= A Note on Google Apps for Android |work = Android Developers Blog |first= Dan |last= Morrill |date= September 25, 2009 |access-date= September 26, 2009| archive-url= https://web.archive.org/web/20091025130628/http://android-developers.blogspot.com/2009/09/note-on-google-apps-for-android.html| archive-date= October 25, 2009 | url-status= live}} 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.{{cite web |url = http://www.cyanogenmod.com/home/the-current-state |title = The current state... |work = CyanogenMod Android ROM |date = September 27, 2009 |access-date = September 27, 2009 |archive-url = https://web.archive.org/web/20091103155814/http://www.cyanogenmod.com/home/the-current-state |archive-date = November 3, 2009 |df = mdy-all }}
Java standards
{{Main article| Comparison of Java and Android API}}
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.{{cite web
| url=http://www.javalobby.org/nl/archive/jlnews_20071113o.html
| title=Google Android: Initial Impressions and Criticism
| date=November 13, 2007
| last=van Gurp
| first=Jilles
| work=Javalobby
| quote=Frankly, I don't understand why Google intends to ignore the vast amount of existing implementation out there. It seems like a bad case of "not invented here" to me. Ultimately, this will slow adoption. There are already too many Java platforms for the mobile world and this is yet another one
| access-date=March 7, 2009
| archive-date=August 28, 2008
| archive-url=https://web.archive.org/web/20080828111808/http://www.javalobby.org/nl/archive/jlnews_20071113o.html
| url-status=usurped
}} However, there are multiple tools in the market from companies such as Myriad Group and UpOnTek that provide Java ME to Android conversion services.{{cite web
|url = http://www.myriadgroup.com/Media-Centre/News/Myriad-New-J2Android-Converter-Fuels-Android-Applications-Gold-Rush.aspx
|title = Myriad's New J2Android Converter Fuels Android Applications Gold Rush
|date = March 19, 2010
|access-date = May 13, 2011
|archive-url = https://web.archive.org/web/20110704072717/http://www.myriadgroup.com/Media-Centre/News/Myriad-New-J2Android-Converter-Fuels-Android-Applications-Gold-Rush.aspx
|archive-date = July 4, 2011
|url-status = dead
|df = mdy-all
|last1=Fruhlinger |first1=Josh
|date=2010-03-23 |df=mdy
|url=https://www.infoworld.com/article/2073306/j2android-hopes-you-don-t-know-that-android-is-java-based.html
|title=J2Android hopes you don't know that Android is Java-based
|work=JavaWorld
|access-date=2020-07-13
|quote=On the other hand, you might think this is kind of a scam aimed at developers who don't really understand the nature of the platform they're targeting. My biggest complaint is that you'd think that Mikael Ricknäs, the IDG News Service reporter who wrote the first story linked to above (who toils for the same company that publishes JavaWorld), would have at least mentioned the relationship between Java and Android to make the oddness of this announcement clear.
|last1=Fruhlinger |first1=Josh
|date=2010-03-31 |df=mdy
|url=https://www.infoworld.com/article/2073324/myriad-cto--j2android-moves-midlets-to--beautiful--android-framework.html
|title=Myriad CTO: J2Android moves MIDlets to "beautiful" Android framework
|work=JavaWorld
|access-date=2020-07-13
|quote=We will have to wait and see exactly how much pickup J2Android actually sees. The tool isn't actually available on the open market just yet; while Schillings spoke optimistically about "converting 1,000 MIDlets in an afternoon," at the moment they're working with a few providers to transform their back catalogs. So those of you out there hoping to avoid learning how to write Android code may have to wait a while.
}}
Android provides its own GUI classes, and does not provide Java AWT, Swing or JavaFX. It does not support the full Java Beans API.{{citation needed|date=November 2019}}
See also
{{Wikiversity|Android programming}}
References
{{reflist}}
Bibliography
{{Refbegin}}
- {{Cite book |first1 = Burnette
|last1 = Ed
|date = July 13, 2010
|title = Hello, Android: Introducing Google's Mobile Development Platform
|publisher = Pragmatic Bookshelf
|edition = 3rd
|isbn = 978-1-934356-56-2
|url = https://archive.org/details/isbn_9781934356562
}}
- {{Cite book
| first1 = Frank
| last1 = Ableson
| first2 = Robi
| last2 = Sen
| first3 = Chris
| last3 = King
| date = January 2011
| title = Android in Action, Second Edition
| publisher = Manning
| edition = 2nd
| isbn = 978-1-935182-72-6
}}
- {{Cite book
| first1 = Shane
| last1 = Conder
| first2 = Lauren
| last2 = Darcey
| date = July 24, 2012
| title = Android Wireless Application Development Volume II: Advanced Topics
| publisher = Addison-Wesley Professional
| edition = 3rd
| isbn = 978-0-321-81384-8
| url = http://www.informit.com/store/product.aspx?isbn=0321813847
}}
- {{Cite book
| first1 = Mark
| last1 = Murphy
| date = June 26, 2009
| title = Beginning Android
| publisher = Apress
| edition = 1st
| isbn = 978-1-4302-2419-8
| url = http://www.apress.com/9781430224198
}}
- {{Cite book |first1 = Reto
|last1 = Meier
|date = March 2010
|title = Professional Android 2 Application Development
|publisher = Wrox Press
|edition = 1st
|isbn = 978-0-470-56552-0
|url = https://archive.org/details/professionalandr00meie_0
}}
- {{Cite book
| first = Chris
| last = Haseman
| date = July 21, 2008
| title = Android Essentials
| publisher = Apress
| edition = 1st
| isbn = 978-1-4302-1064-1
| url = http://www.apress.com/9781430210641
}}
- {{Cite book
| first1 = Ian
| last1 = Clifton
| date = August 3, 2012
| title = The Essentials of Android Application Development LiveLessons (Video Training)
| publisher = Addison-Wesley Professional
| edition = 1st
| isbn = 978-0-13-299658-7
| url = https://mistersaad.com/lifecycle-of-a-mobile-application-development/
}}
{{Refend}}
{{Wikibooks|Android}}
{{Android}}
{{Table Mobile operating systems}}
{{Google LLC}}
{{Linux}}