Development of a mobile app for Android

3,806 views
3,632 views

Published on

Slides from a talk given at the SuperMondays group in February 2010.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,806
On SlideShare
0
From Embeds
0
Number of Embeds
984
Actions
Shares
0
Downloads
110
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • Development of a mobile app for Android

    1. 1. Development of a mobile app for Android Alex Reid SuperMondays, February 2010
    2. 2. Alex Reid • Sorry, not the cage fighter • I’m a software developer • Lead development of a projects database here at the University since 2006. • Mobile development • Android mainly but also iPhone and BB
    3. 3. Content • Overview of mobile apps • How you write a mobile app • Differences from web • Mobile device constraints and benefits • Android • Live coding an app from scratch
    4. 4. Mobile Apps • Lots of us carry small computers around with us • Software development kits allow anyone to write apps for these devices • Some great ... some erm. • Easy distribution through AppStores
    5. 5. Ask the Hoff • I did the Android port of this iPhone app by Never Odd or Even LLP • Shake your phone for wisdom from DH • Featured on Radio 1 • Available on AppStore and Market - 59p
    6. 6. Next Metro • We’ve put the Metro timetable inside your Android or iPhone • Tells you how long the next train at your stop will be • Updated from web service when online • With Never Odd. In discussions with Nexus
    7. 7. How to write an app • Decide which device(s) to target • Download, learn and use the SDK • Test your code on an emulator • Publish • Watch the money roll in
    8. 8. What’s in an SDK? • Libraries • IDE integration (Eclipse, XCode) • Frameworks • Simulators / Emulators • Utilities • Documentation
    9. 9. Differences to web • Less of everything - speed, network, storage, memory & screen real estate • Event driven (Flash, Desktop) • Threading • Crash means the process dies • No cross browser differences :) • Cross device differences though :( • APIs can and do change
    10. 10. Be efficient • Think about battery life • Bad code - device turns into a hand warmer • App must be a good multitasking citizen • Offload data crunching to a server • Assume networks are slow / transient • Recover gracefully. Don’t hang.
    11. 11. Remember • Emulator can be much faster than device • Phone models vary in speed and spec • Avoid object creation, reuse UI widgets • static, int vs Integer, [ ] vs List<T>, getters... • Load things only when you need them • Careful with compressed media • Watch application size (192MB on Android)
    12. 12. Android • A mobile operating system • Uses a modified Linux kernel • Not a Linux distro • Apps are written in Java • Apps don’t run as Java - Dalvik VM • Open source: vendors customise it
    13. 13. Android stack
    14. 14. Why Android? • Range of Android devices / vendors • Rich SDK - free to download and use • Available for Mac, Windows and Linux • Low barrier to entry • Java widely used; easy for C# devs • iPhone very Mac centric
    15. 15. SDKs FTW • Fantastic building blocks ... leverage • Rich library of UI controls and widgets • WebKit • SQLite3 relational database engine • Maps • OpenGL • Hardware: Compass, GPS, Accelerometer
    16. 16. Android Tools • Eclipse 3.5 with Android Developer Tools • Well supported and feature rich IDE • UI design • Debugging • Testing • Deploy to emulator and device (via USB) • Publishing and signing wizards
    17. 17. Jargon • Apps consist of at least one screen or Activity • Activities are linked via Intents • Services are faceless and run indefinitely • Content providers make your app’s data available to other apps • content://org.yourapp/people/Alex
    18. 18. Live coding demo • We’re going to construct an app that plays a sound when you press a button • Not a Java tutorial • Just to give you an idea • But by all means ask later or email me
    19. 19. Sad Trombone • Every office needs this app! • Add a button • Add code so it responds to clicks • Attach code to play a sound • Fix some bugs • Deploy it to a device
    20. 20. Any questions?

    ×