Practical 1 Introduction to Eclipse and Android Set up Environment: 1. Ensure JDK is installed in the PC. 2. Download and install Eclipse IDE (recommended to download Eclipse IDE for Java EE Developers) from http://www.eclipse.org/downloads/ Simply unzip the installer to a designated folder, e.g. “C:\eclipse\”. 3. Download and install Android SDK with similar idea. (.zip and .exe are available) 4. Open Eclipse, for the first run, choose a workspace url to store your projects 5. Add in the Android SDK by going to “Help”-> “Install New Software” 6. Add Location: “http://dl-ssl.google.com/android/eclipse” as “Android” 7. Select on “Development Tools” and proceed “Next” and follow the procedures until it is installed and restarted. 8. Go to “Window”-> “Preferences”, choose “Android” and change the SDK location to where you install the Android SDK. 9. Create a new AVD using AVD Manager and run it (do not shut down the emulator once it is running) 10. If you have an Android device, make sure the device driver is installed on the computer running Eclipse, you may install some software to help you set up the devices (e.g. HTC Sync for HTC devices, KEIS for Samsung devices) a. Set “Settings”-> “Applications”-> “Development”, click on “USB debugging” b. Make sure adb (Android Debug Bridge) is installed on the PC (drivers of device must be installed) c. Select the device instead of the emulators while running applications on Eclipse later on Starting a New Project: 1. Create a new project: File->New->Other and choose “Android->Android Application Project” 2. Name the project as “Practical1” 3. Choose an emulator (e.g. Android 4.2 or the lowest version you want to run, or your Android device’s version) 4. Add package name as “my.edu.utar.practical1” and Create Exercises: 1. Display “Hello World” 2. Prompt for a name, allow the user to choose multiple choices among some options, allow the user to choose a single choice among another set of options and allow the user to click on “Submit” button (*layouts can be designed under res->layout folder, you can drag-and-drop elements to form a layout or type using xmls) 3. Go home and play around with other simple components Taking the Project Home: 1. Copy the whole Workspace (with its metadata) back, you can re-open the whole Workspace and work on it directly from the pendrive as well (Copying the project folder itself will not allow you to re-open in Eclipse easily again)