The Android Development Environment.  Getting started on the Android Platform  Installing required libraries  Programming Android using the Eclipse.

Slides:



Advertisements
Similar presentations
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Scienze dellInformazione Università di Bologna.
Advertisements

Content Testing In Eclipse, with ADT Android Testing Framework
Coursework 2: getting started (1) – running the phone emulator Chris Greenhalgh G54UBI / Chris Greenhalgh
Delrieu Marjorie Loiseau Pierre
Programming Mobile Applications with Android
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
Android Tools & Wireless ADB Αντρέας Λύμπουρας Θεόφιλος Φωκάς Ζαχαρίας Χ’’Λάμπρου.
Android Aims to bring Internet-style innovation and openness to mobile phones.
Get android development environment running. Install – Get and install JDK 5 or 6 (see link in the.
1 Mobile Computing Mobile First (formerly Worklight) Copyright 2015 by Janson Industries.
Android: Hello World Frank Xu Gannon University. Steps Configuration ▫Android SDK ▫Android Development Tools (ADT)  Eclipse plug-in ▫Android SDK and.
Basic, Basic, Basic Android. What are Packages? Page 346 in text Package statement goes before any import statements Indicates that the class declared.
Android Programming Beomjoo Seo Sep., 12 CS5248 Fall 2012.
2. Setting Up Your Android Development Environment.
Android Application Development with Java UPenn CS4HS 2011 Chris Murphy
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
UFCFX5-15-3Mobile Device Development Android Development Environments and Windows.
Setting up the Development Environment Copyright © SUPINFO. All rights reserved Preparation.
How to make it work? Doncho Minkov Telerik Academy academy.telerik.com Technical Trainer
SET UP COMPUTER ** PLEASE BE AWARE SCREENSHOTS MAY NOT MATCH **
Virtual Reality Course Slide  NTU Mobile HCI Lab, Mike Chen   Android Developers 
Getting Started with Android Programming Note: if you have already installed android development tools, please check that you have the same version as.
© Frank Mueller & Seokyong Hong (TA) North Carolina State University Center for Efficient, Secure and Reliable Computing Android Installation Guide (2)
@2011 Mihail L. Sichitiu1 Android Introduction Hello World.
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Android Application Development CSE 5520/4520 Wireless Networks.
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
Android Programming. Outline Preparation Create new project Build and Run a project Debug a project Deploy on devices.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Android Application Development 2013 PClassic Chris Murphy 1.
Sayed Ahmed BSc. Eng. In Computer Sc. and Eng. (BUET), Bangladesh MSc., Computer Science, Canada President/Chief Architect/Lead Developer Justetc (Just.
Better reference the original webpage :
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
CS5103 Software Engineering Lecture 08 Android Development II.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
1 Mobile Computing Set Up Copyright 2015 by Janson Industries.
Operating system for mobile devices with a Java programming interface. Provides tools, e.g. a compiler, debugger, device emulator, and its own Java Virtual.
Testing with Android Part I of II. Android Testing Framework Based on JUnit The Android JUnit extensions provide component-specific test case classes.
Intro to Android Development Ben Lafreniere. Getting up and running Don’t use the VM! ials/hello-world.html.
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
Ali Shahrokni Application Components Activities Services Content providers Broadcast receivers.
Java Android-8 Imran Shafi. Lecture Contents  Debugging Android Projects  Java/XML Errors  Debugger  Logcat Utility  Android Debug Bridge (adb) 
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
DUE Hello World on the Android Platform.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Eclipse Tutorial Barrett Summer Scholars 2011 Sustainable Engineering: Learning to Engineer Truly Green Products.
Presented By: Muhammad Tariq Software Engineer Android Training course.
Android architecture & setting up. Android operating system comprises of different software components arranges in stack. Different components of android.
Android Development Environment Environment/tools Windows Eclipse IDE for Java Developers (v3.5 Galileo) Java Platform (JDK 6 Update 18) Android.
First Venture into the Android World Chapter 1 Part 2.
Android Boot Camp Demo Application – Part 1. Development Environment Set Up Download and install Java Development Kit (JDK) Download and unzip Android.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
ANDROID APPLICATION DEVELOPMENT. ANDROID DEVELOPMENT DEVELOPER.ANDROID.COM/INDEX.HTML THE OFFICIAL SITE FOR ANDROID DEVELOPERS. PROVIDES THE ANDROID SDK.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
Installation of Visual Studio Android emulator and Android Studio
Master Software Solutions Pvt.Ltd.. These days the demand of smart phone is being increased and we have different types of client e.g. Touch Phone, tables,
Day 1 Session 2. Setup & Installation
Introduction to Android Programming
COM594: Mobile Technology Practical – Week 1 Android and Android Studio.
Mobile Device Development
Android Introduction Hello World
Android Studio, Android System Basics and Git
Development-Introduction
CS5103 Software Engineering
John D. McGregor Module 0 Session 2 Infrastructure and problem
The Most Popular Android UI Automation Testing Tool Andrii Voitenko
Android Application Development
Presentation transcript:

The Android Development Environment

 Getting started on the Android Platform  Installing required libraries  Programming Android using the Eclipse IDE  The Android emulator  Debugging Android applications  Other tools

 See:  developer.android.com/sdk/index.html#quickstart  Software to download & install 1. Java Development Kit (JDK) 2. Eclipse IDE 3. Android SDK starter package 4. Eclipse ADT plugin 5. Add Android platform & other comps to SDK

 Download Java Development Kit  ex.html

 Preferred IDE, but you can use others  Requires version 3.5 or higher  Eclipse Classic recommended 

 Core tools needed to get started  developer.android.com/sdk/  Unpack files to a directory of your choice  By default: android-sdk-  Add this directory to your path to use Android tools from the command line

 Download the ADT plugin  Use the Help -> Install New Software function  URL for Eclipse 3.5+ ▪  In the Available Software dialog, select the checkbox next to Developer Tools and click Next  Configure plugin  Open preferences, click on “Android” and set the SDK location

 Launch the Android SDK and AVD Manager  Select at least the latest platform (2.3)

 An Android Virtual Device (AVD) is a configuration of emulator options  An AVD includes:  A hardware profile  A platform  Other options ▪ e.g., emulator skin, screen dimensions, SD card size  A storage area  Create using Android SDK and AVD Manager tool

 Start Eclipse  Create a new Android Project

 Project name: HelloAndroid  Application name: Hello, Android  Package name: course.examples  Create activity: HelloAndroid  Min SDK: 9

package course.examples; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class HelloAndroid extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello, Android"); setContentView(tv); }

 Applications can run in an emulator  Advantages  Fast turnaround  Doesn’t require an actual phone  Uses faster CPU on emulation computer  Disadvantages  Some features unavailable ▪ e.g., no support for bluetooth or USB connections  Performance & user experience can be misleading

 Emulates telephone calls & SMS messages % telnet localhost 5554 > sms send 5554 “This is a text message”  Will emulate typical speeds & latencies for different networks (e.g., edge, gprs, etc.) % telnet localhost 5554 > set speed gprs  Can interconnect multiple emulators % emulator -avd Android_2.2_primary % emulator -avd Android_2.2_secondary  In one dialer app, dial port num of other emulator

 Many more options  See: developer.android.com/guide/developing/tools/e mulator.html

 Can also add trace code into your application // start tracing to "/sdcard/calc.trace" Debug.startMethodTracing("calc"); … // stop tracing Debug.stopMethodTracing();  Will need to set permissions (discussed later) <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE />

 To view results after execution % adb pull /sdcard/calc.trace /tmp % traceview /tmp/calc

 Log viewer  Android logs many events by default  Can use android.util.Log & android.os.Debug class for application-specific logging  View log entries with  % adb logcat  Or inside Eclipse  Window -> Show View -> Other -> Android -> LogCat

 Visual representation of application UI % hierarchyviewer

 Sends psuedorandom events to applications  Can also script events with monkeyrunner API // send event to browswer % adb shell monkey -p com.android.browser -v 500 // send events to all applications % adb shell monkey 500

 Android-specific extensions to Junit  MoreAsserts  Additional result checking classes  ViewAsserts  Asserts about view layout  TouchUtils  Classes for generating touch events  Instrumentation  For monitoring application interaction with system

 Steps for testing Activity  Create an Android test project  Create one or more Android test classes ▪ Add code to each Test class  Test code usually includes test methods for  App initialization  UI behavior & class functionality  Application lifecycle state management

 AndroidTestCase  Test case with access to Activity Context  ActivityUnitTestCase ▪ isolated testing of a single activity  InstrumentationTestCase  Test case with access to system instrumentation & events  ActivityInstrumentationTestCase2 ▪ functional testing of a single activity  Many other test case types  developer.android.com/guide/topics/testing/testing_a ndroid.html

 Junit Test flow  setup()  Put application in known state  run()  Create additional data  Execute method under test  Check result with Assert  tearDown()  Return to known state

 developer.android.com/resources/tutorials/te sting/activity_test.html

 Key steps  Declare your application as "debuggable" in your Android Manifest  Turn on "USB Debugging" on your device  Setup your system to detect your device  See:  developer.android.com/guide/developing/device. html