Android App Development 11-18-2013

58 downloads 69 Views 672KB Size Report
Nov 18, 2013 ... Test and debug your android applications. ... trace logs from your Android application ... Download the Eclipse IDE (e.g. Kepler or Juno).
Android App Development

11-18-2013

 Android app development Read: http://developer.android.com  Building your first app 



Dan Morrill (Clarkson grad)

Exam#2 is scheduled for Tues., Nov. 19, 7:00 pm, Snell 213

PR#2 due: Wednesday, 12/04/13

 Google  OHA

(Open Handset Alliance)  The first truly open and comprehensive platform for mobile devices, all of the software to run a mobile phone but without the proprietary obstacles that have hindered mobile innovation.  Designed primarily for touchscreen mobile devices and tablets

 Linux OS kernel  Java programming  Open source libraries: SQLite, WebKit, OpenGL

 Views:  Building

block for user interface components.

 Activities: A

single, focused thing that the user can do.

 Services (Background)  e.g.

Network Operation

 Intent  Intercommunication

among activities or services

 Resource  Externalization

of strings and graphics

 Notification  signaling

users: Light, sound, icon, dialog, …

 The Android Emulator  Implementation

of the Android virtual machine  Test and debug your android applications.

 Android Debug Bridge (ADB)  Manages

the state of an emulator instance or Android-powered device  Copy files, install compiled application packages, and run shell commands.  Traceview: Graphical analysis tool for viewing the trace logs from your Android application  Debug your application and profile its performance

 Get the Android SDK  

http://developer.android.com/index.html Recommends: Android Developer Tools (ADT) bundle ● Eclipse with ADT plugin ● Android SDK tools ● Android Platform-tools ● The latest Android platform ● The latest Android system image for the emulator

 Install the SDK and Eclipse IDE  Tutorial: Building your first app 

http://developer.android.com/training/basics/firstapp/index.html

 Android Studio 0.3.5 released Nov. 2013  New IDE for the Android platform  Based on IntelliJ IDEA (from jetbrains.com)

 Download the latest JDK (Java distribution)  Download the Eclipse IDE (e.g. Kepler or Juno)  Install the Android SDK starter package from:  http://developer.android.com/sdk/index.html

 In Eclipse, the ADT (Android DeveloperTools) plugin:  http://developer.android.com/sdk/eclipse-adt.html  install

 Instructions on setting up the SDK and development Environment can be found on:  http://developer.android.com/sdk/installing.html

 Gives access to Android development tools from within the Eclipse IDE  Automates the process of building a new Android project by setting up all the basic files needed for development  Allows code signing of your app so it can be distributed

 http://developer.android.com/sdk/eclipseadt.html#installing (to simplify ADT setup, install the Android SDK prior to installing ADT ) 1. Start Eclipse, then select Help>Install New Software.... 2. Click Add, in the top-right corner. 3. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location: https://dl.google.com/eclipse/plugin/4.3 4. In the Available Software dialog, select the checkbox next to Developer Tools and click Next. 5. In the next window, you'll see a list of the tools to be downloaded. Click Next. 6. Read and accept the license agreements, then click Finish. 7. When the installation completes, restart Eclipse.

 Add your virtual development devices using this  AVD is a target device simulator: no sensors

Once you complete the New Project Wizard, ADT creates the following folders and files in your new project:  src/ Includes your stub Activity Java file. All other Java files for your application go here.  / Includes the android.jar file that your application will use  gen/ This contains the Java files generated by ADT, such as your R.java file and interfaces created from AIDL files.  assets/This is empty. You can use it to store raw asset files.  res/ A folder for your application resources, such as drawable files, layout files, string values, etc.  AndroidManifest.xml The Android Manifest for your project.  default.properties This file contains project settings, such as the build target.

 Download and install the Android SDK and Android Developer Tools (ADT)  Do the first tutorial to create an app  Have Fun!