Android software development: Difference between revisions

Content deleted Content added
Dcxf (talk | contribs)
SDK section
Dcxf (talk | contribs)
Reorder sections
Line 1:
'''Android software development''' is the process by which new applications are created for the [[Android (operating system)|Android operating system]].
 
==History==
[[Image:Android mobile phone platform early device.jpg|thumb|200px|Early Android device.]]
The early feedback on developing applications for the Android platform was mixed.<ref name="MixedFeedback">{{cite web |url=http://arstechnica.com/news.ars/post/20071219-google-android-plagued-by-dysfunctional-development-process.html |title=Developing apps for Google Android: it's a mixed bag |accessdate=2007-12-19 |last=Paul |first=Ryan |date=2007-12-19 |work=[[Ars Technica]]}}</ref> Issues cited include bugs, lack of documentation, inadequate QA infrastructure, and no public issue-tracking system. (Google announced an issue tracker on 18 January 2008.)<ref>{{cite web |url=http://android-developers.blogspot.com/2008/01/you-cant-rush-perfection-but-now-you.html |title=You can't rush perfection, but now you can file bugs against it |work=Android Developers Blog |first=Dan |last=Morrill |date=18 January 2008 |accessdate=2009-09-03}}</ref> 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."''<ref name="Bugs">{{cite web |url=http://online.wsj.com/article_email/SB119800856883537515-lMyQjAxMDE3OTE4ODAxMDg4Wj.html |title=Glitches Bug Google's Android Software |accessdate=2007-12-19 |last=Morrison |first=Scott |date=2007-12-19 |work=The Wall Street Journal |publisher= }}</ref> Despite this, Android-targeted applications began to appear the week after the platform was announced. The first publicly available application was the [[Snake (video game)|Snake game]].<ref>{{cite web |url=http://www.android-freeware.org/download/snake |title=Snake |accessdate=2008-01-26 |work=Android Freeware Directory}}</ref><ref name="Snake">{{cite web |url=http://www.mobiles2day.com/2007/11/14/first-android-application-snake/ |title=First Android Application&nbsp;— Snake |accessdate=2008-01-07 |date=2007-11-14 |work=Mobiles2day |publisher= }}</ref>
The [[Android Dev Phone]] is a [[Subscriber Identity Module|SIM]]-unlocked and hardware-unlocked device that is designed for advanced developers. While developers can use regular consumer devices purchased at retail to test and use their applications, some developers may choose not to use a retail device, preferring an unlocked or no-contract device.
 
A preview release of the Android SDK was released on 12 November 2007. On 15 July 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 (and keeping this arrangement private) led to widely reported frustration within the Android developer community at the time.<ref>{{cite web |url=http://www.theregister.co.uk/2008/07/14/android_developer_unrest/ |title=Google plays Hide and Seek with Android SDK |first=Cade |last=Metz |date=14 July 2008 |accessdate=2008-10-23 |work=[[The Register]]}}</ref>
 
On 18 August 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.<ref>{{cite web |url=http://code.google.com/android/intro/upgrading.html |title=Android&nbsp;— An Open Handset Alliance Project: Upgrading the SDK |accessdate=2008-10-24}}{{Dead link|date=September 2009}}</ref> On 23 September 2008 the Android 1.0 SDK (Release 1) was released.<ref>{{cite web |url=http://developer.android.com/sdk/older_releases.html |title=Other SDK Releases |accessdate=2009-09-02 |work=Android Developers}}</ref> 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.<ref>{{cite web |url=http://developer.android.com/sdk/older_releases.html |title=SDK Archives}}</ref>
 
==Android SDK==
Line 16 ⟶ 7:
 
Android applications are packaged in [[APK (file format)|.apk]] format and stored under <code>/data/app</code> folder on the Android OS (the folder is accessible to root user only for security reasons). APK package contains .dex files<ref>{{cite web |url=http://developer.android.com/guide/appendix/glossary.html |title=Android SDK Glossary}}</ref> (compiled byte code files called [[Dalvik Virtual Machine|Dalvik]] executables), resource files, etc.
 
==Native code==
Libraries written in [[C (programming language)|C]] and other languages can be compiled to [[ARM architecture|ARM]] [[native code]] and installed using the Android [[Native Development Kit]]. Native classes can be called from Java code running under the Dalvik VM using the <code>System.loadLibrary</code> call, which is part of the standard Android Java classes.<ref>{{cite web |url=http://davanum.wordpress.com/2007/12/09/android-invoke-jni-based-methods-bridging-cc-and-java/ |title=Android&nbsp;— Invoke JNI based methods (Bridging C/C++ and Java) |last=Srinivas |first=Davanum |date=2007-12-09 |accessdate=2008-12-13}}</ref><ref>{{cite web |url=http://developer.android.com/reference/java/lang/System.html |title=java.lang.System |work=Android Developers |accessdate=2009-09-03}}</ref>
 
Complete applications can be [[Compiler|compiled]] and installed using traditional development tools.<ref name="benno">{{cite web |url=http://benno.id.au/blog/2007/11/13/android-native-apps |title=Native C application for Android |date=13 November 2007|work=Benno's blog|first=Ben |last=Leslie |accessdate=2009-09-04}}</ref> The ADB debugger gives a root shell under the Android Emulator which allows native [[ARM architecture|ARM code]] to be uploaded and executed. ARM code can be compiled using [[GNU Compiler Collection|GCC]] on a standard PC.<ref name="benno"/> Running native code is complicated by the fact that Android uses a non-standard C library (libc, known as [[Bionic (software)|Bionic]]). The underlying graphics device is available as a [[framebuffer]] at ''/dev/graphics/fb0''.<ref>{{cite mailing list |url=http://groups.google.com/group/android-developers/msg/ace258af92fff692?dmode=source&pli=1 |title=Native C *GRAPHICAL* applications now working on Android emulator |last=Cooksey |first=Tom |mailinglist=android-developers |date=2007-11-07 |accessdate=2008-12-13}}</ref> The graphics library that Android uses to arbitrate and control access to this device is called the [[Skia Graphics Engine|Skia Graphics Library]] (SGL), and it has been released under an open source license.<ref>{{cite web|url=http://src.chromium.org/viewvc/chrome/trunk/src/skia/|title=Skia source}}</ref> Skia has backends for both [[win32]] and [[Unix]], allowing the development of cross-platform applications, and it is the graphics engine underlying the [[Google Chrome]] web browser.<ref>{{cite web |url=http://www.atoker.com/blog/2008/09/06/skia-graphics-library-in-chrome-first-impressions/ |title=Skia graphics library in Chrome: First impressions |last=Toker |first=Alp |date=2008-09-06 |accessdate=2008-12-13}}</ref>
 
==App Inventor for Android==
Line 29 ⟶ 25:
{{Main|Android Developer Challenge}}
The Android Developer Challenge was a competition for the most innovative application for Android. Google offered prizes totaling 10 million [[US dollar]]s, distributed between ADC I and ADC II. ADC I accepted submissions from 2 January to 14 April 2008. The 50 most promising entries, announced on 12 May 2008, each received a $25,000 award to further development.<ref>{{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 = 12 May 2008 |accessdate = 2009-09-04}}</ref><ref>{{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 = 13 May 2008}}</ref> It ended in early September with the announcement of ten teams that received $275,000 each, and ten teams that received $100,000 each.<ref name=ADC>{{cite web |url=http://code.google.com/android/adc/adc_gallery/ |title=ADC I Top 50 Gallery |accessdate=2009-05-19 |work=Android Developer Challenge}}</ref> ADC II was announced on 27 May 2009.<ref name="Challenge">{{cite web |url=http://code.google.com/android/adc/ |title=Android Developer Challenge |accessdate=2008-01-11 |work=Google Code}}</ref> The first round of the ADC II closed on 6 October 2009.<ref>{{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 = 6 October 2009 |accessdate =2009-11-03}}</ref> The first-round winners of ADC II comprising the top 200 applications were announced on 5 November 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.<ref>{{cite web |url = http://code.google.com/android/adc/gallery_winners.html |title = ADC 2 Overall Winners |work = Android Developer Challenge |publisher = Google |accessdate =2010-12-05}}</ref><ref>{{cite web |url = http://www.businessweek.com/the_thread/techbeat/archives/2009/11/android_develop_2.html |title = Android Developer Challenge 2 Winners Announced |work = BusinessWeek |first = Olga |last = Kharif |date = 30 November 2009 |accessdate =2010-12-05}}</ref>
 
==Native code==
Libraries written in [[C (programming language)|C]] and other languages can be compiled to [[ARM architecture|ARM]] [[native code]] and installed using the Android [[Native Development Kit]]. Native classes can be called from Java code running under the Dalvik VM using the <code>System.loadLibrary</code> call, which is part of the standard Android Java classes.<ref>{{cite web |url=http://davanum.wordpress.com/2007/12/09/android-invoke-jni-based-methods-bridging-cc-and-java/ |title=Android&nbsp;— Invoke JNI based methods (Bridging C/C++ and Java) |last=Srinivas |first=Davanum |date=2007-12-09 |accessdate=2008-12-13}}</ref><ref>{{cite web |url=http://developer.android.com/reference/java/lang/System.html |title=java.lang.System |work=Android Developers |accessdate=2009-09-03}}</ref>
 
Complete applications can be [[Compiler|compiled]] and installed using traditional development tools.<ref name="benno">{{cite web |url=http://benno.id.au/blog/2007/11/13/android-native-apps |title=Native C application for Android |date=13 November 2007|work=Benno's blog|first=Ben |last=Leslie |accessdate=2009-09-04}}</ref> The ADB debugger gives a root shell under the Android Emulator which allows native [[ARM architecture|ARM code]] to be uploaded and executed. ARM code can be compiled using [[GNU Compiler Collection|GCC]] on a standard PC.<ref name="benno"/> Running native code is complicated by the fact that Android uses a non-standard C library (libc, known as [[Bionic (software)|Bionic]]). The underlying graphics device is available as a [[framebuffer]] at ''/dev/graphics/fb0''.<ref>{{cite mailing list |url=http://groups.google.com/group/android-developers/msg/ace258af92fff692?dmode=source&pli=1 |title=Native C *GRAPHICAL* applications now working on Android emulator |last=Cooksey |first=Tom |mailinglist=android-developers |date=2007-11-07 |accessdate=2008-12-13}}</ref> The graphics library that Android uses to arbitrate and control access to this device is called the [[Skia Graphics Engine|Skia Graphics Library]] (SGL), and it has been released under an open source license.<ref>{{cite web|url=http://src.chromium.org/viewvc/chrome/trunk/src/skia/|title=Skia source}}</ref> Skia has backends for both [[win32]] and [[Unix]], allowing the development of cross-platform applications, and it is the graphics engine underlying the [[Google Chrome]] web browser.<ref>{{cite web |url=http://www.atoker.com/blog/2008/09/06/skia-graphics-library-in-chrome-first-impressions/ |title=Skia graphics library in Chrome: First impressions |last=Toker |first=Alp |date=2008-09-06 |accessdate=2008-12-13}}</ref>
 
==Community-based firmware==
Line 66 ⟶ 57:
Developers have reported that it is difficult to maintain applications on multiple versions of Android, owing to compatibility issues between versions 1.5 and 1.6,<ref>{{cite web |url = http://blogs.zdnet.com/Greenfield/?p=481 |title = Android's Weakest Link |publisher=[[ZDNet]] |date = 2009-10-11 |accessdate = 2010-01-15}}</ref> especially the different resolution ratios in use among various Android phones.<ref>{{cite web |url = http://androidandme.com/2009/11/news/complications-looming-for-android-developers/ |title = Complications looming for Android developers |publisher=androidandme.com |date = 2009-11-06 |accessdate = 2010-01-15}}</ref> Such problems were pointedly brought into focus as they were encountered during the ADC2 contest.<ref>{{cite web |url = http://www.techcrunch.com/2009/10/11/a-chink-in-androids-armor/ |title = A Chink In Android's Armor |date = 2009-10-11 |publisher=[[TechCrunch]] |quote=''And now they're faced with a landslide of new handsets, some running v.1.6 and some courageous souls even running android v.2.0. All those manufacturers/carriers are racing to release their phones by the 2009 holiday season, and want to ensure the hot applications will work on their phones. And here's the problem&nbsp;– in almost every case, we hear, there are bugs and more serious problems with the apps.[...]First of all, the compatibility between versions issue may be overblown. The reported problems have been limited to an Android developer contest[...]We haven’t heard of any major app developers complaining of backwards or forward compatibility problems. Also, I’ve now upgraded my phone from 1.5 to 1.6, and every application continues to work fine.'' |accessdate = 2009-10-11}}</ref> Further, the rapid growth in the number of Android-based phone models with differing hardware capabilities also makes it difficult to develop applications that work on all Android-based phones.<ref>{{cite web |url = http://www.wired.com/gadgetlab/2009/11/android-fragmentation/ |title = Android’s Rapid Growth Has Some Developers Worried |date = 2009-11-16 |publisher=[[Wired News]] |quote=''Fagan’s concerns about the fragmentation of Android is being echoed by other developers, says Sean Galligan, vice president of business development at Flurry, an mobile app analytics company(...)"You may build an app that works perfectly with all three firmwares, but then when you run it on carriers’ ROMs it completely blows up," says Fagan. "So we find ourselves having to create apps that are compatible with multiple firmwares, multiple ROMs and multiple devices with different hardware.'' |accessdate = 2010-02-26}}</ref><ref>{{cite web |url = http://www.javaworld.com/community/node/3704 |title = Android just reproducing Java ME's problems, now |date = 2009-11-17 |publisher=[[JavaWorld]] |accessdate = 2010-02-26}}</ref><ref>{{cite web |url = http://www.businessweek.com/technology/content/oct2009/tc20091015_626136.htm |title = Android's Spread Could Become a Problem |date = 2009-10-15 |publisher=[[Bloomberg BusinessWeek|BusinessWeek]] |accessdate = 2010-02-28}}</ref><ref>{{cite web |url = http://infoworld.com/d/mobilize/google-androids-self-destruction-derby-begins-863 |title = Google Android's self-destruction derby begins |date = 2010-02-22 |publisher=[[InfoWorld]] |accessdate = 2010-02-28}}</ref> As of August 2010, 83% of Android phones run the 2.x versions, and 17% still run the 1.5 and 1.6 versions<ref>{{cite web |url = http://developer.android.com/resources/dashboard/platform-versions.html |title = Platform Versions |date = 2010-05-03 |publisher=developer.android.com |accessdate = 2010-08-07}}</ref>
 
==History==
[[Image:Android mobile phone platform early device.jpg|thumb|200px|Early Android device.]]
The early feedback on developing applications for the Android platform was mixed.<ref name="MixedFeedback">{{cite web |url=http://arstechnica.com/news.ars/post/20071219-google-android-plagued-by-dysfunctional-development-process.html |title=Developing apps for Google Android: it's a mixed bag |accessdate=2007-12-19 |last=Paul |first=Ryan |date=2007-12-19 |work=[[Ars Technica]]}}</ref> Issues cited include bugs, lack of documentation, inadequate QA infrastructure, and no public issue-tracking system. (Google announced an issue tracker on 18 January 2008.)<ref>{{cite web |url=http://android-developers.blogspot.com/2008/01/you-cant-rush-perfection-but-now-you.html |title=You can't rush perfection, but now you can file bugs against it |work=Android Developers Blog |first=Dan |last=Morrill |date=18 January 2008 |accessdate=2009-09-03}}</ref> 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."''<ref name="Bugs">{{cite web |url=http://online.wsj.com/article_email/SB119800856883537515-lMyQjAxMDE3OTE4ODAxMDg4Wj.html |title=Glitches Bug Google's Android Software |accessdate=2007-12-19 |last=Morrison |first=Scott |date=2007-12-19 |work=The Wall Street Journal |publisher= }}</ref> Despite this, Android-targeted applications began to appear the week after the platform was announced. The first publicly available application was the [[Snake (video game)|Snake game]].<ref>{{cite web |url=http://www.android-freeware.org/download/snake |title=Snake |accessdate=2008-01-26 |work=Android Freeware Directory}}</ref><ref name="Snake">{{cite web |url=http://www.mobiles2day.com/2007/11/14/first-android-application-snake/ |title=First Android Application&nbsp;— Snake |accessdate=2008-01-07 |date=2007-11-14 |work=Mobiles2day |publisher= }}</ref>
The [[Android Dev Phone]] is a [[Subscriber Identity Module|SIM]]-unlocked and hardware-unlocked device that is designed for advanced developers. While developers can use regular consumer devices purchased at retail to test and use their applications, some developers may choose not to use a retail device, preferring an unlocked or no-contract device.
 
A preview release of the Android SDK was released on 12 November 2007. On 15 July 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 (and keeping this arrangement private) led to widely reported frustration within the Android developer community at the time.<ref>{{cite web |url=http://www.theregister.co.uk/2008/07/14/android_developer_unrest/ |title=Google plays Hide and Seek with Android SDK |first=Cade |last=Metz |date=14 July 2008 |accessdate=2008-10-23 |work=[[The Register]]}}</ref>
 
On 18 August 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.<ref>{{cite web |url=http://code.google.com/android/intro/upgrading.html |title=Android&nbsp;— An Open Handset Alliance Project: Upgrading the SDK |accessdate=2008-10-24}}{{Dead link|date=September 2009}}</ref> On 23 September 2008 the Android 1.0 SDK (Release 1) was released.<ref>{{cite web |url=http://developer.android.com/sdk/older_releases.html |title=Other SDK Releases |accessdate=2009-09-02 |work=Android Developers}}</ref> 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.<ref>{{cite web |url=http://developer.android.com/sdk/older_releases.html |title=SDK Archives}}</ref>
 
== References ==