Your SlideShare is downloading. ×
Getting Started With Android
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Getting Started With Android

5,409

Published on

Published in: Technology, Education
0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,409
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
498
Comments
0
Likes
8
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Mobile without Linux is like Forest without birds SOMS Lecture Series 02
  • 2. Getting started with Google Android M Qasim Ali President, SOMS June 25 th 2009
  • 3. Agenda
    • Android platform
    • Development tools
    • Android programming
  • 4. What is Android?
    • “ Android is a software stack for mobile devices that includes an operating system, middleware and key applications”
  • 5. Android applications
    • are written in the Java language
    • run on the Dalvik virtual machine
  • 6. Dalvik VM
    • not a Java VM
    • design constraints: slow CPU, little RAM
    • will run on OS without swap space
    • http://sites.google.com/site/io/dalvik-vm-internals
  • 7. Getting started
  • 8. Development tools
    • Android SDK
    • Eclipse plugin
  • 9. Android SDK
    • Android emulator
    • command line tools
    • documentation
    • example applications
  • 10. Android emulator
  • 11. Command line tools
    • aapt - Android asset packaging tool
    • adb - Android debug bridge
    • aidl - Android IDL compiler
    • emulator - Android emulator
  • 12. Emulator limitations
    • No support for placing or receiving actual phone
    • calls
    • No support for camera/video capture (input)
    • No support for audio input
    • No support for determining connected state
    • No support for determining battery charge level
    • No support for Bluetooth
  • 13. Eclipse plugin
  • 14. Android applications
    • application package file: myapp.apk
    • an application is composed of one or more activities
  • 15. Activity
    • an activity is usually a single screen in your application
    • however, activities can also be faceless
    • one activity is designated as the entry point for your application
  • 16. android.app.Activity import android.app.Activity; public class MyActivity extends Activity{ public void onCreate(Bundle savedValues){ super.onCreate(savedValues); setContentView(R.layout.main); } }
  • 17.  
  • 18. Application Building blocks
    • AndroidManifest.xml
    • Activities
    • Views
    • Layouts
    • Intents & IntentReceivers
    • Services
    • Notifications
    • ContentProviders
  • 19. App main User Interface Will create app layout according to the xml description: main.xml
  • 20. Source code Layout Resource file: aapt tool App’s source code App’s package Android Project Android built in packages – Wifi, GSM, other sensors Apps behavior in Android system App main User Interface Resource delimitations
  • 21. Manifest file AndroidManifest.xml Apps behavior in Android system
  • 22. Implementing your application UI
    • Java code
    • XML
  • 23. Android UI: XML App main User Interface
  • 24. Android UI: Views
    • an object that knows how to draw itself on the screen
    • examples:
      • android.widget.ListView
      • android.widget.DatePicker
      • android.widget.Button
      • android.widget.ImageView
  • 25. < TextView > < LinearLayout >
  • 26. Intents
    • “ an Intent is a simple message object that represents an ‘intention’ to do something”
    • “ an intent is an abstract description of an operation to be performed”
  • 27. android.content.Intent
    • VIEW_ACTION
    • EDIT_ACTION
    • PICK_ACTION
    • WEB_SEARCH_ACTION
    • SYNC_ACTION
    • ...
  • 28. Application Context
    • android.app.ApplicationContext
      • startActivity(Intent)
      • getSystemService
      • createDatabase
      • openDatabase
      • deleteDatabase
      • ...
  • 29. Additional topics
    • Threading
    • Security model
    • Internationalization
    • Power management
    • AIDL - Android IDL
    • Data synchronization
    • API for WiFi
  • 30. Additional Resources
    • http://code.google.com/android/
    • http://android-developers.blogspot.com
    • http://code.google.com/p/apps-for-android/
    • http://sites.google.com/site/io/
    • http://www.openhandsetalliance.com/
    • http://git.android.com
  • 31. Application vs. Activity
    • An application can be composed of multiple Activities, but one application must have at least one Activity.
    • Each “window” or screen of your application is a separate Activity.
  • 32. Application: Hello Android!
  • 33. Source code Layout Resource file: aapt tool App’s source code App’s package Android Project Android built in packages – Wifi, GSM, other sensors Apps behavior in Android system App main User Interface Resource delimitations
  • 34. App main User Interface Resource delimitations Apps behavior in Android system
  • 35. Apps behavior in Android system App’s source code
  • 36.  
  • 37. public non-public We are writing a function that is present in parent class Activity as PROTECTED member inherited derived
  • 38. public non-public: protected inherited derived Activity HelloAndroid Public: OnCreate() inherited derived keyword: super refers to the data member inherited from the base class Protected: OnCreate() super.OnCreate()
  • 39. App main User Interface Will create app layout according to the xml description: main.xml
  • 40. < TextView > < LinearLayout >

×