developing for android

28
Developing for Android Erik Nykl

Upload: kennedy-larsen

Post on 30-Dec-2015

56 views

Category:

Documents


0 download

DESCRIPTION

Developing for Android. Erik Nykl. Developing for Android. History of Mobile Why Android? Mobile Development Process Writing Code! Android API (Google’s Java library) Use Hardware Embedded Java & Code Efficiency. Mobile History. Motorola DynaTAC 8000X Released in 1983 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Developing for Android

Developing for Android

Erik Nykl

Page 2: Developing for Android

Developing for Android

• History of Mobile• Why Android?• Mobile Development Process• Writing Code!– Android API (Google’s Java library)• Use Hardware

– Embedded Java & Code Efficiency

Page 3: Developing for Android

Mobile History

• Motorola DynaTAC 8000X– Released in 1983– First mobile phone– 30 minute talk time– Cost only $4000

• Rudy Krolopp– Lead Designer

Picture:http://msnbcmedia4.msn.com/j/msnbc/Components/Photos/050408/050408_motorola_firstphone_vmed4p.grid-4x2.jpg

Page 4: Developing for Android

Mobile History

• First PDA: Apple Newton released in 1993 (original iPad)

• Hand writing recognition• Only three applications– Notes– Names– Dates

• Product was a big flop

Picture:http://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Apple_Newton.jpg/368px-Apple_Newton.jpg

Page 5: Developing for Android

Mobile History

• 2000 – Nokia/Ericsson releases Symbian OS• 2001 – Microsoft announces Windows CE

Pocket PC OS• 2002 – Palm OS Treo– Allowed third-party applications that could be

downloaded• 2002 – RIM releases first BlackBerry

Page 6: Developing for Android

Mobile History• 2007 – A major year in mobile– Early 2007 - Nokia N95

• First phone with WiFi, GPS, 5 MP camera, 3G, and TV-Out

– Mid 2007 – Apple iPhone• First multi-touch interface for smart phone• Best mobile web browser at the time• No OFFICIAL support for third party apps• iOS 1.0

– November 2007 – Open Handset Alliance• OHA was formed • Android – An open source operating system built on the 2.6

Linux Kernel was released

Page 7: Developing for Android

Developing for Android

• History of Mobile• Why Android?• Mobile Development Process• Writing Code!– Android API (Google’s Java library)• Use Hardware

– Embedded Java & Code Efficiency

Page 8: Developing for Android

Why Android?

• Android is the fastest growing mobile operating system– In the Summer 2010 nearly 200,000 Android devices activated

each day

• Android has the fastest growing App Store (Android Market)

• Android WILL be the dominant smart phone OS– Open source and freer application development– Open platform - hardware manufacturers can do whatever they want

and competition has decreased hardware dev cycle (down to 6 months; Apple has yearly releases)

• http://www.gartner.com/it/page.jsp?id=1543014• http://www.canalys.com/pr/2011/r2011013.html

Page 9: Developing for Android

Why Android?• Apple has first “successful” App Store• Development is done in Objective-C– IDE: XCode

• Apple requires $99 to develop for the iPhone• Apple screens each App and can remove an App

from the store at any time for any reason– “Guilty until proven innocent”

• Apple can also blacklist your name and account• Apple takes 30% of each sale• Development pretty much requires a Mac

Page 10: Developing for Android

Why Android?• Android’s App Store: Android Market• Development done in Java– IDE: Preferred Eclipse, Netbeans, …, or none– Totally supportive for multiplatform development

• $25 developer signup fee• Unfortunately also take 30% of sale price• Relies on users to screen apps– “Innocent until proven guilty”

• Open hardware platform

Page 11: Developing for Android

Developing for Android

• History of Mobile• Why Android?• Mobile Development Process• Writing Code!– Android API (Google’s Java library)• Use Hardware

– Embedded Java & Code Efficiency

Page 12: Developing for Android

Mobile Software Process

• How can we develop for mobile applications?• Will traditional development methods work?– Waterfall, RAD, Spiral, Incremental

• How about Agile?• Mobile App Requirements– Shall be easy to use– Shall be responsive (OS & User)– Shall be delivered quickly to market

Page 13: Developing for Android

Mobile Software Process

• Mobile applications have a larger domain than desktop based applications– Not just a number crunching app– Informational Services– Content-based services– Location-based services

Page 14: Developing for Android

Mobile Software Process• New challenges for developers– Wireless communication issues

• Switching from 3G to WiFi and back to 3G

– Mobility issues• Location dependent app looses GPS signal

– Portability• New OS every year with updates every 3-6 months• Dozens of different hardware setups

– New hardware every 6 months

– Privacy• Phone knows much more about you than your credit

card information

Page 15: Developing for Android

Mobile Software Process

• A Hybrid Method Engineering Approach for Mobile Software Development– Vahid Rahimian, Raman Ramsin

• Developed using a process for making processes (Method Engineering)

Page 16: Developing for Android

Developing for Android

• History of Mobile• Why Android?• Mobile Development Process• Writing Code!– Android API (Google’s Java library)• Use Hardware

– Embedded Java & Code Efficiency

Page 17: Developing for Android

Writing Code!• Finally, coding!• Almost

Page 18: Developing for Android

Writing Code!

• Some fundamentals

• http://developer.android.com/guide/topics/fundamentals.html

Page 19: Developing for Android

Writing Code!

• So what all do we need?– Android SDK– Netbeans with Android plugin– Probably want some Android hardware– Don’t necessarily have to get a developer account

quite yet

Page 20: Developing for Android

Writing Code!

• AndroidManifest.xml– Every application MUST have this file in the root

directory (don’t worry, usually created for you)– Describes what stuff the app will use– Libraries, minimum API level, declares which

permissions the app needs

– http://developer.android.com/guide/topics/manifest/manifest-intro.html

Page 21: Developing for Android

Writing Code!

• It IS Java right?– Yes, basically. Close enough at least.– Dalvik is the custom JVM for Android– Written by Dan Bornstein originally– Named after a village in Eyjafjörður, Iceland where

some of his ancestors lived– Uses its own byte code (not Java byte code)– Uses its own library (no AWT or Swing)– As of Android 2.2 a JIT Compilier was added

(speed increases of up to 450%!)

Page 22: Developing for Android

Writing Code!

• Good Practice– If something is going to take a long time spawn a

thread!• http://developer.android.com/guide/practices/design/responsiveness.html

Page 23: Developing for Android

Developing for Android

• History of Mobile• Why Android?• Mobile Development Process• Writing Code!– Android API (Google’s Java library)• Use Hardware

– Embedded Java & Code Efficiency

Page 25: Developing for Android

Developing for Android

• History of Mobile• Why Android?• Mobile Development Process• Writing Code!– Android API (Google’s Java library)• Use Hardware

– Embedded Java & Code Efficiency

Page 26: Developing for Android

Embedded Java and Code Efficiency

• You are coding in an embedded environment!– Limited memory, disk space, battery length, and

limited CPU power

• http://developer.android.com/guide/practices/design/performance.html

Page 27: Developing for Android

Development Resources

• http://www.anddev.org/• http://developer.android.com/

Page 28: Developing for Android

References• http://developer.android.com/guide/index.html• Book: Beginning Android 2; Mark L. Murphy• http://www.anddev.org/ • Rahimian, V.; Ramsin, R.; , "Designing an agile methodology for mobile software

development: A hybrid method engineering approach," Research Challenges in Information Science, 2008. RCIS 2008. Second International Conference on , vol., no., pp.337-342, 3-6 June 2008doi: 10.1109/RCIS.2008.4632123URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4632123&isnumber=4632084