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.

Like this presentation? Why not share!

Getting Started With Android Application Development [IndicThreads Mobile Application Development Conference]

on

  • 2,780 views

Session Presented at 1st IndicThreads.com Conference On Mobile Application Development held on 19-20 November 2010 in Pune, India ...

Session Presented at 1st IndicThreads.com Conference On Mobile Application Development held on 19-20 November 2010 in Pune, India
WEB: http://M10.IndicThreads.com

------------

Speaker: Rohit Ghatol

Abstract:
This session looks at -
Introduction to Android
Android OS Capabilities
Building Blocks of Android
Use Case – Building Blocks and their Interaction for Gmail Client
Understanding Android UI
Challenges in building Android Application and Best Practices
Web Services Client
Database Vs File Vs Shared Preferences
Minimizing GC
Fetch online Vs Local Cache
Working in Background Threads
Building custom Widgets

Statistics

Views

Total Views
2,780
Views on SlideShare
2,753
Embed Views
27

Actions

Likes
3
Downloads
197
Comments
0

1 Embed 27

http://m10.indicthreads.com 27

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-NoDerivs LicenseCC Attribution-NoDerivs License

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…
Post Comment
Edit your comment

Getting Started With Android Application Development  [IndicThreads Mobile Application Development Conference] Getting Started With Android Application Development [IndicThreads Mobile Application Development Conference] Presentation Transcript

  • Android Basics Rohit Ghatol QuickOffice & Synerzip
  • About Me
    • Name: Rohit Ghatol
    • Occupation:
      • Architect @QuickOffice
      • Project Mgr @Synerzip
      • Certified Scrum Master
    • Thinks I like to do:
      • Talk at Technical Platforms
      • Agile Evangelism
      • Motivational Speaker and Trainer
    LinkedIn Profile
  • Topics
    • Introduction to Android
    • Android OS Capabilities
    • Building Blocks of Android
    • Understanding HelloWorld
    • Use Case – Building Blocks in Gmail Client
    • Understanding Android UI
    • References & Further Reading
  • Introduction to Android
    • Software stack for mobile devices that includes
      • an operating system
      • middleware
      • key applications
      • SDK to develop application
  • Introduction to Android
  • Introduction to Android
    • About Android Applications
      • Written in Java
      • Compiled to .dex
      • Run in Dalvik VM
      • Packaged and Shipped as APK
  • Introduction to Android
    • About Dalvik VM
      • Cut from Apache Harmony Project
      • Device can run multiple VMs efficiently
      • Executes Dalvik Executable (.dex) - optimized for minimal memory footprint
      • Watch Video – Dalvik VM Internals
  • More about Applications Dalvik VM Linux Process Linux Kernel Process Process Process Dalvik VM Dalvik VM Dalvik VM Uid 1 Uid 2 Uid 3 data data com.xyz.email com.abc.skype com.koko.sukudo shared_prefs files databases . . . . . . . . . . . . UID 1 UID 2 UID 3
  • Android Versions OS Version Nickname API Level Date Comments 1.1 __ 2 February 2009 1.5 Cupcake 3 30 April 2009 Based on Linux Kernel 2.6.27 1.6 Donut 4 5 September 2009 Based on Linux Kernel 2.6.29 2.1 Eclair 7 26 October 2009  Based on Linux Kernel 2.6.29 2.2  Froyo 8 20 May 2010 Based on Linux Kernel 2.6.32 2.3 Gingerbread Q4 2010 3.0 Based on Linux Kernel 2.6.33 or .34 3.0 Honeycomb early 2011
  • Android OS Capabilities
    • Features
    • Phone and OS features
      • 3G, GPS, Accelerometer, SQLite, Camera, Telephony, Webkit, etc
    • Reuse of Data
    • Reuse of Functionality
  • Android Phone Demo
    • Before anything you must see what an Android Phone looks like!
    • Desktop
    • Notification Bar
    • Contact Manager
    • Gmail Application
  • Reuse of Data Default Contact Manager New Contact Manager Replaces What happens to data feed into the default Contact Manager?
  • Reuse of Data Default Contact Manager New Contact Manager Replaces Content Provider But Uses
  • Reuse of Functionality Sudoko Game
    • New Requirement
    • Share with Friends using
    • SMS
    • Email
    Time to learn SMS API and Email API and code them into my application! More code! Hee hee 
  • Reuse of Functionality Sudoko Game SMS Mail SMS Mail Intention: Want to send Email Here are two applications who can do it for you.
  • Reuse of Functionality Sudoko Game SMS Mail SMS Mail Intention: Want to send Email
  • Building Blocks of Android Activity (Screen) Service (Background) Broadcast Receiver (respond to events) Content Provider (Database/ Directory) Notification Manager ...... Alarm Manager Read more - http://developer.android.com/guide/topics/fundamentals.html
  • Environment Setup
  • Environment Setup
  • Environment Setup Text
  • Environment Setup Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Simple HelloWorld Text
  • Building Application .
    • You need a Screen (Activity)
    • Views could be
    • Buttons
    • Text Views
    • etc ….
    • Layouts could be
    • Linear Layout
    • Relative Layout
    • Table Layout
    • etc …..
  • Building Block - Activity
    • Activity Life Cycle
  • Building Block - Activity
    • Activity Life Cycle made easier
    Foreground LifeCycle Visible LifeCycle Complete LifeCycle onCreate onDestroy onStart onStop onResume onPause
  • Building Block - Activity
    • What to do in each life cycle methods?
    onCreate onDestroy onStart onStop onResume onPause
  • Building Block - Service
    • Service
    • LifeCycle
  • Building Block – Broadcast Receiver
    • Broadcast Receiver is more of a Call back
    • Android will call your Broadcast receiver depending on the intent filter
  • Building Block – Content Provider
    • Content Provider are more of RestFul like exposed Database
    • They are accessed using Content Resolver
    • They can allow full CRUD Operations on them (Any application can add/delete/edit contacts in Phone’s Contact Manager)
  • Building Block – Intents
    • Need
    • Class Name
    • Need
    • ACTION
    • CATEGORY
    • DATA
  • Building Block – Intents <?xml version= &quot;1.0&quot; encoding=&quot;utf-8&quot;?> <manifest xmlns:android= &quot;http://schemas.android.com/apk/res/android&quot; package= &quot;com.sample“ android:versionCode= &quot;1“ android:versionName= &quot;1.0&quot;> <application android:icon= &quot;@drawable/icon&quot; android:label=&quot;@string/app_name&quot;> <activity android:name= &quot;.HelloWorld&quot; android:label= &quot;@string/app_name&quot;> <intent-filter> <action android:name= &quot;android.intent.action.MAIN&quot; /> <category android:name= &quot;android.intent.category.LAUNCHER&quot; /> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion= &quot;4&quot; /> </manifest> Program launcher shows all the activities which have MAIN Action and LAUNCHER category
  • Building Application . So what happens two activities have the exact same intent filter and an intent is fired. Simple you choose one application, and you have an option to tell to se that application as the default application hence forth
  • Building Application .
    • Using Intents
    • Intent to launch an Activity
    • Context.startActivity(intent)
    • ContextstartActivityForResult(intent)
    • Intent to launch an Service
    • Context.startService(intent)
    • Intent to send a broadcast
    • Context.sendBroadCast(intent)
  • Building Block – Permissions
    • <manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android package=&quot;com.android.app.myapp&quot; > …………………………………………………………….. <uses-permission android:name=&quot;android.permission.RECEIVE_SMS&quot; />
    • </manifest>
  • Understanding Android UI
    • Lets Draw the Screen using Linear Layouts
    Current Playlist Player
  • Understanding Android UI
    • Lets Draw the Screen using Linear Layouts
    Current Music Info Progress Bar Buttons Music file 1 Music file 2 Music file 3 Music file 4
  • Understanding Android UI
    • Lets Draw the Screen using Linear Layouts
    Current Music Info Progress Bar Music file 1 Music file 2 Music file 3 Music file 4 Prev Next Play
  • Layout XML ………………………… . ………………………… .
  • Understanding Android UI
    • Lets Draw the Screen using Relative Layouts
    Beautiful World Take That Title is aligned to the top and right of the image Author is aligned to the bottom and right of the image
  • Layout XML
  • Understanding Android UI
    • Use Layouts
      • Layouts can be defined in different XML files
      • Code can refer to these layout xml files
  • Gmail Application – Use Case
  • Building Blocks of Android Activity Service Broadcast Receiver Content Provider/ SQL ite Database Data Store (Email List) Communication is using Intents Gmail Sync Phone Boots
  • Phone Boots Activity Gmail Sync Service Phone Boots Broadcast R Data Store (Email List) Database Events.. Alarm M.. Notifi. M..
  • Phone Boots Gmail Sync (5 mins) Gmail Sync Service Phone Boots Broadcast R Data Store (Email List) Database Events.. Alarm M.. Activity Notifi. M..
  • Phone Boots Gmail Sync (5 mins) Gmail Sync Service Phone Boots Broadcast R Data Store (Email List) Database Events.. Alarm M.. Activity Notifi. M..
  • Phone Boots Gmail Sync (5 mins) starts Gmail Sync Service Phone Boots Broadcast R Data Store (Email List) Database Events.. Alarm M.. Activity Notifi. M..
  • Phone Boots Gmail Sync (5 mins) Completes Gmail Sync Service Phone Boots Broadcast R Data Store (Email List) Database Events.. Alarm M.. Activity Notifi. M..
  • Phone Boots Gmail Sync (5 mins) Stores Gmail Sync Service Phone Boots Broadcast R Data Store (Email List) Database Events.. Alarm M.. Activity Notifi. M..
  • Phone Boots Gmail Sync (5 mins) Stores Gmail Notification Gmail Sync Service Phone Boots Broadcast R Data Store (Email List) Database Events.. Alarm M.. Activity Notifi. M..
  • Phone Boots Gmail Sync (5 mins) Gmail Notification Gmail Sync Service Phone Boots Broadcast R Data Store (Email List) Database Events.. Alarm M.. Activity Notifi. M..
  • Phone Boots Gmail Sync (5 mins) Gmail Notification Gmail Sync Service Phone Boots Broadcast R Data Store (Email List) Database Events.. Alarm M.. Activity Notifi. M..
  • Phone Boots Gmail Sync (5 mins) Gmail Notification Gmail Sync Service Phone Boots Broadcast R Data Store (Email List) Database Events.. Alarm M.. Activity Notifi. M..
  • References & Further Reading
    • What is Android?
    • Android Fundamentals
    • Notepad Guided Tutorial
    • Common Tasks?
    • Articles and Docs
    • Best Practices - Performance
  • Youtube Videos - Android http://www.youtube.com/user/GoogleDevelopers#g/c/316B437F0CB82A68
  • Reach Me
    • Linked In
    • Email – [email_address]