• Save
A Noob’S Guide To Android Application Development
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

A Noob’S Guide To Android Application Development

on

  • 22,798 views

Slides for Singapore BarCamp3

Slides for Singapore BarCamp3

Statistics

Views

Total Views
22,798
Views on SlideShare
22,385
Embed Views
413

Actions

Likes
40
Downloads
0
Comments
5

15 Embeds 413

http://www.slideshare.net 167
http://www.codeandroid.org 95
http://www.fandroid.org 48
http://www.techgig.com 36
http://theyoungbusinessman.biz 33
http://linuxnus.org 12
http://sg.codeandroid.org 6
http://nushackers.org 5
http://www.linkedin.com 3
http://androiddevelopmentkit.net 2
http://webcache.googleusercontent.com 2
http://www.linux.rk.edu.pl 1
http://richardreisig.com 1
http://www.lmodules.com 1
https://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Pro download http://www.mediafire.com/?t39rxi3m3u9g12b
    Are you sure you want to
    Your message goes here
    Processing…
  • Good One
    Are you sure you want to
    Your message goes here
    Processing…
  • good one !
    Are you sure you want to
    Your message goes here
    Processing…
  • Very nice guide, I'm sure it was part of a live talk/presentation, would be more useful as a companion slideset for a talk.
    Are you sure you want to
    Your message goes here
    Processing…
  • Your presentation is Great......!! Please give permissions for download.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

A Noob’S Guide To Android Application Development Presentation Transcript

  • 1. A Noob’s Guide to Android Application Development By: Chua Zi Yong Singapore Android User Group www.codeandroid.org BarCamp Singapore 3 28/2/2009
  • 2. Who am I?
    • Student from NUS – Bioengineering
    • Interest in mobile platforms
    • C programming
    • sellAndroid != false (Google can pay me if they want =D);
    • Intent intent = new Intent(BarCamp3.this, ShareInterest.class);
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 3. What is in this presentation?
    • Why Android?
    • How to Get Started?
    • “ Deep” Dive
    • How to Publish?
    • Resources Available
    • Q&A
  • 4. Why Android? I am cool! By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 5. Why Android?
    • Open Market Place
      • Instant publishing and feedback!
      • You can create “ANYTHING”
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 6. Why Android?
    • Background applications
      • Finally useful apps
        • fBook notification!
        • Contextual based applications
        • … .. yourapp.apk
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 7. Why Android?
    • Develop on ANY platform FREE (no need to buy!)
      • Windows
      • Linux
      • Mac
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 8. Why Android?
    • Not just on mobile!
      • Netbooks
      • MIDs
      • Desktop Phone??
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 9. How to get started? Fix me! By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 10. How to get started?
    • Things to install (developer.android.com)
      • Java Developers Kit (JDK )
      • Eclipse or any other IDE
      • Android SDK
      • Android Developers Tool (ADT)
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 11. “ Deep” Dive By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 12. “ Deep” Dive
    • Applications in Java
      • Import Java libraries
      • Import Android libraries
        • GUI
        • Widgets
        • Animation
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 13.
    • Starting an Application
    • Activity Lifecyle
      • void onCreate
      • void onStart()
      • void onRestart()
      • void onResume() 
      • void onPause()
      • void onStop()
      • void onDestroy()
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org “ Deep” Dive
  • 14.
    • Applications Fundamentals
    • Activities (Application != Activity)
      • What the user see on the screen
      • 1 app can have multiple activities
      • Draw using xml and call by Activity.setContentView()
    • Services
      • Runs in background indefinitely
      • E.g. music playback even when activity is stopped
    • Broadcast receivers
      • does nothing but receive and react to broadcast announcements
      • E.g. SMS receiver
    • Content providers
      • Data that can be accessed by the application
      • SQlite or any file system
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org “ Deep” Dive
  • 15.
    • Applications Fundamentals
    • Intent
      • Intent object holds the content of the message
      • E.g. intent is used when you want to start a new activity and intent will carry the name of the activity and content needed to be pass through
    • Android Manifest
      • Declaring the application's components e.g. libraries
      • Identifying any permissions the application expects to be granted
      • Mostly auto generated by ADT in Eclipse
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org “ Deep” Dive
  • 16.
    • Example: PathFinder@SG extending ListActivity
    Package: com.pathfinder.sg CategoriesListActivity.java PlacesListActivity.java Services: MyPositionService .java (to obtain location from GPS, cell tower) Content Provider: xml file in /res/raw containing location data By: Chua Zi Yong Singapore Android User Group www.codeandroid.org “ Deep” Dive
  • 17. Set view using ListAdapter (since this is ListActivity) Starting GPS/ntw service Staring the Application: OnCreate Android logging class for logcat on DDMS (debugging) By: Chua Zi Yong Singapore Android User Group www.codeandroid.org “ Deep” Dive
  • 18. Moving to Another Activity Using Intent By: Chua Zi Yong Singapore Android User Group www.codeandroid.org Initialize intent variable: Intent(packageContext,  Class) Start activity Add extended content to be passed through intent: putExtra(String name, value) Bonus point: If you intend to end current activity and back to previous, use finish() instead “ Deep” Dive
  • 19. Make sure you stop services that is not needed upon exit! i.e. GPS service will otherwise continue to run in background By: Chua Zi Yong Singapore Android User Group www.codeandroid.org Remember to consider other parts of the lifecycle “ Deep” Dive
  • 20. By: Chua Zi Yong Singapore Android User Group www.codeandroid.org Android Manifest User permission needed Declare activities within the application “ Deep” Dive
  • 21.
    • Applications Debugging
      • DDMS in Eclipse using ADB
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org “ Deep” Dive
  • 22. How to Publish? By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 23. How to Publish?
    • Export and signing your app
      • Export your application from Eclipse project
      • Application will be exported as .apk
      • Sign myapp.apk with Keytool and Jarsigner (within JDK)
        • Take note on validity date of private key during keygen – recommend at least “10000 days”
      • http://developer.android.com/guide/publishing/app-signing.html
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org Suggested commands $ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -validity 10000 $ jarsigner -verbose -keystore my-release-key.keystore my_application.apk alias_name
  • 24. How to Publish?
    • Publishing on Android Market
      • Sign up as an Android developer at developer.android.com
      • USD$25 sign up fee
      • Upload and monitor!
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 25. How to Publish?
    • Market Business Policies
      • Payment - 70% developer 30% telco
      • Currently paid apps in UK and US
      • No obscene materials (porn etc)
      • 24 hour return policy
      • Dispute resolution handled by developer and user directly
      • Google holds the right to remove application if found of violation
      • http://www.codeandroid.org/forum/?wpforumaction=viewtopic&t=1.0
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 26. Resources By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 27. Resources
    • Android Resources
      • developer.android.com
    • Open Source Codes for Android Application
      • code.google.com/hosting/
    • Online Tutorials
      • www.anddev.org
    • Developers Group
      • Google Group (Android Beginner, Developer, Discuss)
      • Codeandroid.org (Singapore Android User Group)
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 28. Resources
    • GUI XML Tool for Android
      • DroidDraw
    • Hacking/Flashing Android ROMs
      • XDA Developers
    • List of all applications on Android Market
      • http://www.cyrket.com/
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  • 29. Q&A By: Chua Zi Yong Singapore Android User Group www.codeandroid.org ??