A Noob’S Guide To Android Application Development

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

  • + awadbensaleh awadbensaleh 2 months ago
    Your presentation is Great......!! Please give permissions for download.
Post a comment
Embed Video
Edit your comment Cancel

6 Favorites

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
    • 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
    • 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
    • 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
    • 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
  13. 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
  14. 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
  15. 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
  16. By: Chua Zi Yong Singapore Android User Group www.codeandroid.org Android Manifest User permission needed Declare activities within the application “ Deep” Dive
    • Applications Debugging
      • DDMS in Eclipse using ADB
    By: Chua Zi Yong Singapore Android User Group www.codeandroid.org “ Deep” Dive
  17. How to Publish? By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  18. 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
  19. 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
  20. 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
  21. Resources By: Chua Zi Yong Singapore Android User Group www.codeandroid.org
  22. 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
  23. 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
  24. Q&A By: Chua Zi Yong Singapore Android User Group www.codeandroid.org ??

+ chuazychuazy, 8 months ago

custom

2772 views, 6 favs, 3 embeds more stats

Slides for Singapore BarCamp3

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 2772
    • 2634 on SlideShare
    • 138 from embeds
  • Comments 1
  • Favorites 6
  • Downloads 0
Most viewed embeds
  • 95 views on http://www.codeandroid.org
  • 33 views on http://theyoungbusinessman.biz
  • 10 views on http://linuxnus.org

more

All embeds
  • 95 views on http://www.codeandroid.org
  • 33 views on http://theyoungbusinessman.biz
  • 10 views on http://linuxnus.org

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories