1 / 20

Intro to Android Development

Intro to Android Development. Ben Lafreniere. Getting up and running. Don’t use the VM! http://developer.android.com/resources/tutorials/hello-world.html Steps: Install Eclipse Install the Android Development Tools (ADT) plugin Install the Android SDK (may be optional) Create an emulator

maj
Download Presentation

Intro to Android Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Intro to Android Development Ben Lafreniere

  2. Getting up and running • Don’t use the VM! • http://developer.android.com/resources/tutorials/hello-world.html • Steps: • Install Eclipse • Install the Android Development Tools (ADT) plugin • Install the Android SDK (may be optional) • Create an emulator • Hello world!

  3. Download and Install Eclipse • Eclipse has many versions! • Go with Eclipse Classic(32- or 64-bit depending on your system) • http://www.eclipse.org/downloads

  4. Install ADT plugin • http://developer.android.com/sdk/eclipse-adt.html#installing

  5. Download and Install the Android SDK • http://developer.android.com/sdk/index.html

  6. Use SDK Manager to install APIs • Why so many SDK versions? • Android is a UI toolkit being incrementally developed before our eyes • Install and use Android 2.3.3 SDK (API 10) • Because these are the phones we’ll be marking on

  7. Video walkthrough • anddev_installing.avi

  8. Creating an emulator • Not all developers have android devices • So we emulate one! • Video • anddev_create_emu.avi

  9. Developing with the Emulator • Emulator takes a long time to boot up • Enabling the ‘Snapshot’ option speeds things up by saving the emulator’s state when it’s closed, and restoring it when it’s started again • You can keep the emulatoropen between runs • Don’t develop on the VM!(the emulator will run way too slow)

  10. Android Programming

  11. Creating an Android project • http://developer.android.com/resources/tutorials/hello-world.html

  12. Hello World! • HelloAndroidActivity.java

  13. Android App Anatomy – Classes • Activity – A single screen of the application • View – The superclass for widgets(the UI is made up of a tree of View objects) • Intent – An action that must be performed

  14. Activities • A single, focused thing that the user can do • Should use an Activity for each screen of the application • Activities must be declared in the Manifest file

  15. Views • Superclass of all Android widgets(similar to java.awt.Component in Swing)

  16. Views • Superclass of all Android widgets(similar to the Component class from Swing)

  17. Intents • Abstract description of an action that the user wants to perform (e.g. open a webpage,share a picture) • Used to transition betweenActivities • Includes the intended action,and may include data

  18. Code Examples • HelloAndroid – One Activity, One TextView, very simple • FormExample – Two Activities, using an Intent to start a second Activity • DataPassExample – Builds on FormExample, using Intents to pass data between Activities

  19. Much more • Using XML layouts to separate presentation from logic • Using strings.xml in lieu of hard-coded strings • Saving the application’s state when an activity is paused

  20. Useful references • Android Developershttp://developer.android.com • Tutorials sectionhttp://developer.android.com/resources/browser.html?tag=tutorial • Notebook tutorial (detailed multi-Activity example)http://developer.android.com/resources/tutorials/notepad/index.html • Common taskshttp://developer.android.com/resources/faq/commontasks.html

More Related