Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android code lab @ GDG Indore

Android code lab @ GDG Indore

It was my first speaking engagement of the year 2013. It was actually an Android code lab organized by GDG Indore, India on 12th January 2013.

Paresh Mayani

January 12, 2013
Tweet

More Decks by Paresh Mayani

Other Decks in Technology

Transcript

  1. Android Code lab
    Paresh Mayani

    View Slide

  2. Who am I? :D
    Android & WP7 Developer @Digicorp
    Head, GDG Ahmedabad
    @pareshmayani
    www.TechnoTalkative.com

    View Slide

  3. What is Android?
    Why Android?
    Where Android?

    View Slide

  4. Why Android?
    1.3 Million
    Android Device Activations Per Day

    View Slide

  5. Why Android?
    400 Million
    Total Android device Activated http://goo.gl/1f45r

    View Slide

  6. Why Android?
    68.1%
    Android Market Share world wide – Q3 2012
    http://www.huffingtonpost.com/2012/09/18/android-market-share-q3-2012_n_1893292.html

    View Slide

  7. Why Android?
    • We love and trust Google
    • Open Source
    • Larger screen size (iPhone is Fixed size :D )
    • Google Play Store
    • Various Manufacturers

    View Slide

  8. View Slide

  9. Where Android?

    View Slide

  10. Where Android?

    View Slide

  11. Where Android?

    View Slide

  12. Where Android?
    http://goo.gl/s98Du
    Project Glass:

    View Slide

  13. Building blocks of Android App
    Activities
    Views
    Services
    Content Providers
    Notifications
    Intents

    View Slide

  14. Building blocks of Android App
    Activities
    Views
    Services
    Content Providers
    Notifications
    Intents

    View Slide

  15. Activities
    • Fundamental object of
    android app with lifecycle
    • Having UI
    • Interact with the user
    • One app can have Multiple
    activities
    • Must have 1 Main Activity

    View Slide

  16. Building blocks of Android App
    Activities
    Views
    Services
    Content Providers
    Notifications
    Intents

    View Slide

  17. Views
    • Basic building block for UI
    components
    • Draws itself to the screen
    • Respond to Events

    View Slide

  18. Building blocks of Android App
    Activities
    Views
    Services
    Content Providers
    Notifications
    Intents

    View Slide

  19. Intents
    • A simple message object that represents an
    "intention" to do something
    • Most significant use => launching of
    activities, where it can be thought of as the
    glue between activities.

    View Slide

  20. View Slide

  21. Building blocks of Android App
    Activities
    Views
    Services
    Content Providers
    Notifications
    Intents

    View Slide

  22. Services
    • can perform long-running
    operations in the background
    • Doesn’t Provide User Interface
    (UI)
    • Another application
    component can start a service
    and it will continue to run in
    the background even if the
    user switches to another
    application.

    View Slide

  23. Building blocks of Android App
    Activities
    Views
    Services
    Content Providers
    Notifications
    Intents

    View Slide

  24. Content Providers
    • presents data to external applications
    • provide a level of abstraction for any data
    stored on the device that is accessible by
    multiple applications.

    View Slide

  25. Android application - 3
    Activity 3.1
    Android application - 2
    Activity 2.1
    Activity 2.1
    Android application - 1
    Activity 1.1
    Activity 1.2
    Activity 1.3
    Content
    Provider - A
    XML Data
    File
    SQLite Remote

    View Slide

  26. Building blocks of Android App
    Activities
    Views
    Services
    Content Providers
    Notifications
    Intents

    View Slide

  27. Notifications
    • A Notification is a small icon
    that appears in the status
    bar.
    • Users can interact with this
    icon to receive information
    • For example: New SMS
    message, Missed call, New
    Mail

    View Slide

  28. How to Install Android?
    1. Download and setup the Eclipse IDE
    http://eclipse.org/downloads/
    2. Download JDK & Install
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    3. Download the Android SDK starter package
    http://developer.android.com/sdk/index.html
    4. Android Development Tools (ADT) plug-in , download from within eclipse
    https://dl-ssl.google.com/android/eclipse/

    View Slide

  29. How to Install Android?
    Download the SDK
    ADT Bundle for Windows
    • ADT (Android Developer Tools)
    Bundle
    • With a single download, the
    ADT Bundle includes everything
    you need to begin developing
    apps:
    – Eclipse + ADT plug-in
    – Android SDK Tools
    – Android Platform-tools
    – The latest Android platform
    – The latest Android system image
    for the emulator

    View Slide

  30. Android Development Environment

    View Slide

  31. Eclipse IDE
    Package
    Structure of
    your Android app
    Source Code
    Problems/Erros and Console messages
    Program
    Elements

    View Slide

  32. Eclipse UI Editor
    UI Elements
    UI View area

    View Slide

  33. Where to execute Android programs?
    - Emulator or Real Device

    View Slide

  34. Android Virtual Device Manager

    View Slide

  35. Android Virtual Device Manager

    View Slide

  36. Let’s create New AVD

    View Slide

  37. Android project structure

    View Slide

  38. Types of Layout
    Linear Layout
    Relative Layout
    Frame Layout
    Table Layout
    GridLayout

    View Slide

  39. Types of Widgets

    View Slide

  40. • Used to show captions or string values
    TextView

    View Slide

  41. Button
    • It used to execute some task based on the button’s
    click/selection action.

    View Slide

  42. View Slide

  43. EditText
    • Used to accept some inputs from the user.

    View Slide

  44. ImageView
    • Used to display image resources like logo, icon, etc.

    View Slide

  45. View Slide

  46. CheckBox
    • It’s for the selection of items.

    View Slide

  47. View Slide

  48. RadioButton
    • Its a two-states button that can be either checked or unchecked.

    View Slide

  49. View Slide

  50. Get in Touch
    twitter.com/pareshmayani
    fb.com/GDGAhmedabad
    http://gplus.to/GDGAhmedabad
    www.TechnoTalkative.com
    gplus.to/paresh.mayani

    View Slide