Android for Ubiquitous Computing Researchers. Andrew Rice University of Cambridge 17-Sep-2011

Size: px
Start display at page:

Download "Android for Ubiquitous Computing Researchers. Andrew Rice University of Cambridge 17-Sep-2011"

Transcription

1 Android for Ubiquitous Computing Researchers Andrew Rice University of Cambridge 17-Sep-2011

2 Getting started Website for the tutorial: Contains links to downloads and resources. First we need to install and set up the development tools: Java Eclipse Android Software Development Kit Android Developer Tools plugin for Eclipse Instructions are on the tutorial website

3 We will build a GeoMessaging application The user can leave a message consisting of an image and some text at their current location Whenever anyone with the application installed goes near that location their phone displays the message

4 1) Press button to take a picture with the camera 2) Type message into the box provided 3) Press the "Leave Message" button to send message & location to the server

5

6 Use the Android SDK to build applications Available for free for Windows, Linux and Mac 1) target libraries for different android versions 2) extra versions with Google API (like maps) 3) emulator 4) tools for building apks 5) proguard for code obfuscation 6) adb debugger Optional eclipse plugin installed separately

7 A phone emulator is included Based around QEMU Emulates an ARM platform (goldfish) Contains some useful features like injecting a location Tips: Leave it running all the time in the background Turn on snapshots [CTRL]+[F21] simulates a screen rotation

8 Don't expect the emulator to be fast! Intel Core2 Quad CPU 2.66GHz, 8GB RAM Intel Core Duo CPU 1.66 GHz, 1GB RAM

9 The emulator supports a wide range of configurations

10 This tutorial uses Version 2.1 Platform Codename API Level Usage Cool new feature 1.5 Cupcake 3 1.0% Assisted GPS 1.6 Donut 4 1.8% Gestures and Text-to-speech 2.1 Eclair % Bluetooth API 2.2 Froyo % Wifi hotspots + JIT for Dalvik Gingerbread 9 0.6% Gingerbread % Concurrent garbage collector 3.0 Honeycomb % Large screen support (tablets) 3.1 Honeycomb % USB Host support 3.2 Honeycomb % Usage figures from 2 weeks in September 2011

11 Launch the emulator, leave it running [CTRL]+[F12]

12 GeoTutorial Overview 1. Creating the project 2. Building the user interface 3. Taking and storing a photo 4. Collecting a GPS location 5. Uploading message to the server

13 Create a new project File -> New -> Other... -> Android project

14 Launch your project Right-click on GeoTutorial Run As -> Android Application

15 GeoTutorial Overview 1. Creating the project 2. Building the user interface 3. Taking and storing a photo 4. Collecting a GPS location 5. Uploading message to the server

16 Now we will design the user interface Double click on GeoTutorial -> res -> main.xml

17 Make sure that the 'Outline' and 'Properties' views are visible You can add it by going to Window -> Show view -> Outline Window -> Show view -> Other... -> Properties

18 The user interface is declared in XML under the hood

19 The abstraction is of a tree of views

20 Delete the default TextView Delete the TextView - "HelloWorld, GeoTutorial" by clicking on it in the Outline view and pressing [DELETE]

21 Add another LinearLayout 1. Click on the Layouts section of the Palette 2. Drag the LinearLayout (Vertical) 3. Drop it onto the phone 4. Click the Properties view 5. Change the id 6. Save your changes

22 The Android plugin automatically generates ID's to use in your code Double click on GeoTutorial -> gen -> R.java We entered an + id/ entry in R.java auto-generate it the 'id' section

23 Set the size of the LinearLayout 1. Click back to main.xml 2. Open the Misc Properties section 3. Set Layout height to '150dp' 4. Set Layout width to 'fill_parent'

24 The size of a View can be 'relative' or 'absolute' Absolute size Relative size fill_parent View will grow to fill as much space as is available dp Size will be exactly this number of Density Independent Pixels (dp). One dp is millimeters on wrap_content View will shrink to be as small as possible for the content it contains the screen of the device you are running on

25 Now add an ImageButton 1. Choose the Images & Media Palette 2. Drag the ImageButton view 3. Drop it on the phone 4. Popup dialog, choose System resources 5. Choose ic_menu_camera 6. Click OK 7. Autogenerate a new ID 'takephotobutton' 8. Expand it to fill the width and height

26 Now add a plain text box (EditText) 1. Choose the Text Fields Palette 2. Drag the 'Plain Text' component 3. Drop it on the lower part of the phone screen 4. Autogenerate an ID 'editmessage' Ensure your design has editmessage as a child of the first LinearLayout and not of takephotocontainer

27 Constant strings in your application should be placed in a separate resource file 1. Open GeoTutorial -> res -> values -> strings.xml 2. Click Add In dialog, choose String 4. Enter name 'editmessagedefaulttext' 5. Enter value 'Please enter your message here' (or in your choice of language) 6. Save your changes

28 Set the default text of the text box Set the Text property Notice the similarity between strings and IDs Have a look in R. java to see what's happened

29 Add the final button to the user interface 1. Drag the Button view from the Form Widgets palette 2. Drop it on the phone screen under the text box 3. Set it to fill the width of the screen 4. Change the ID to 'sendmessagebutton' 5. Add a new string 1. Set the key to be 'sendmessagebuttontext' 2. Set the value to be 'Send Message' 6. Set the Text property of the new button to use this string 7. Save your changes 8. Run your application (Run as -> Android application)

30 When we rotate the screen our application layout rotates with it We can provide different layouts if we want main.xml Default layout main-land.xml Override default for landscape orientation main-large.xml Override default for large screens main-land-large.xml Override default for large, landscape screens Complete list of qualifiers is here: com/guide/topics/resources/providing-resources.html

31 GeoTutorial Overview 1. Creating the project 2. Building the user interface 3. Taking and storing a photo 4. Collecting a GPS location 5. Uploading message to the server

32 Android calls oncreate() first 1. Open GeoTutorialActivity.java 2. The oncreate() method gets called when your app is starting 3. The call to setcontentview(...) finds the XML defining the layout 'main' and creates the user interface from it

33 Now override the remaining lifecycle methods 1. Right-click in the class (just before the final closing brace) 2. Choose 'Source' 3. Choose 'Override/ Implement methods' 4. Select the methods to override 5. Choose OK

34 Add a debug message to each method 1. Add a constant value TAG to label each message 2. Add an import for android.util.log 3. Write a log message for each life-cycle method 4. Run your application again

35 The debug log can be viewed in Eclipse 1. Open the DDMS perspective: try the 'Open Perspective' button 2. Select the Android instance you want to connect to 3. Find the LogCat tab 4. Scroll to the bottom of the log 5. Look for 'GeoTutorial' events

36 Experiment to see when the lifecycle methods are called Press the 'Home' button to leave your application (You can start it again from the application menu on the phone) Use the 'Back' button Rotate the screen

37 Think carefully about what you do in each lifecycle method oncreate() Setup static variables, create the user interface, register event handlers onstart() Register for events (e.g. GPS) onrestart() onresume() Start animations onpause() Commit unsaved data, stop animations, stop consuming CPU onstop() Deregister for any events ondestroy()

38 Add a handler to respond to presses of the photo button

39 To capture an image we use an Intent Intents are events passed to move between parts of an application and between applications Explicit intent say exactly which class you wish to be invoked the runtime locates it (starts an application if needed) Normally used to move within an application Implicit intent say what kind of action you want to take place the runtime determines the best way to service it e.g dial a number could be serviced by built-in Dialler or a VOIP client Normally used to move between applications

40 Change the onclicklistener to request a photo Now test your application

41 Many Intents need to return a result You specify a requestcode This code is returned back so you know what the information was for The resultintent contains any returned data

42 Override the onactivityresult method

43 Extract the Bitmap from the returned data 1. Add a field to your class to store the Bitmap object (we need it later to send to the server) 2. Extract the bitmap from the result 3. Add import statement for android.graphics.bitmap

44 We need a reference to the button and its container 1. Create two new field variables to hold the references 2. Make sure you assign to the field and not a local variable 3. Find the container in the layout 4. Add suitable import statements

45 Remove the ImageButton and replace it with an ImageView Now test your application

46 GeoTutorial Overview 1. Creating the project 2. Building the user interface 3. Taking and storing a photo 4. Collecting a GPS location 5. Uploading message to the server

47 We request location updates and wait for a callback oncreate Find the LocationManager Create a LocationListener to handle new location events onstart Register for GPS location updates from the LocationListener. This will start the GPS. onstop Unregister for location updates. This will let the GPS switch off.

48 Create the LocationListener in the oncreate method 1. Add new field variables for the LocationManager and LocationListener 2. Get a reference to the system service LocationManager 3. Create a new LocationListener object 4. (Add appropriate import statements)

49 Register in the onstart method and unregister in the onstop method Now test your application (it should crash)

50 'Force close' means that your application threw an exception

51 We need permission to use the GPS Android uses a coarse grained permission system The application describes which permissions it needs in its manifest file The user is asked if this is OK when the application is installed Runtime checks are used to check whether the application has the permissions it needs You can see in the exception report which permission was missing

52 We request the permission in the Manifest file 1. Open AndroidManifest. xml 2. Choose the Permissions tab 3. Click Add Choose 'Uses Permission' 5. Click OK 6. Choose ACCESS_FINE_LOCATION 7. Save the changes Now test your application

53 We need some extra permissions for later on too... add INTERNET and WRITE_EXTERNAL_STORAGE permissions to your application

54 Use the DDMS view to inject a location event

55 Change the LocationListener to store the location we receive 1. Add a new field 'lastlocation' to hold the saved value 2. When the location changes, save the value in lastlocation

56 GeoTutorial Overview 1. Creating the project 2. Building the user interface 3. Taking and storing a photo 4. Collecting a GPS location 5. Uploading message to the server

57 The GeoMessagingServer receives your messages The server is implemented in Java Servlets Source code is available on the website Follow the link on the website and view the current set of messages

58 We upload our new message to the server using an HTTP POST request Download additional libraries to include in your application from the website apache-mime4j-0.6.jar httpmime-4.0.jar servertools.jar Save these files in the project directory inside your eclipse workspace Right click on the project and choose Refresh to make them show up

59 Add the libraries to the build path of your application 1. Select the three library files 2. Right-click and choose Build path -> Add to Build path

60 Porting a library to Android is straightforward Android supports a subset of the Java class libraries Swing or AWT are of course omitted If your library doesn't use any classes outside this then you can just add the jar file to your application as before If some unsupported parts of Java are required then you'll have to make modifications

61 1. Create a method stub 'postmessage' 2. Get a reference to the sendmessagebutton 3. Add an onclicklistener to call postmessage()

62 We use a Toast to show the error messages 1. Add two new constant strings for error messages if 1. there is no location available 2. there is no photograph taken yet 2. Add code to postmessage to test these conditions and Toast the error

63 Get a reference to the EditText object which holds the message

64 Collect the details of the message together

65 The application runs using a single thread A 'Looper' runs a Thread's message queue A 'Handler' is used to put messages on the queue and receive messages when they come off the head 1. Application starts 2. Create the message queue 3. Create a Handler for processing UI events (like touchscreen events) 4. Loop indefinitely taking an event off the queue and invoking handlemessage on the Handler which put it there 5. Whenever a UI event occurs (asynchronously) use sendmessage on the Handler to add an event to the queue

66 Applications have a single thread for the user interface Don't perform long running actions (such as uploading data to a server) in the user interface thread Watch out for concurrency problems when you add another thread For example: don't change anything in the user interface from a different thread Instead, add another Handler and use it to post events to the message queue and deal with them

67 Create our new Handler in the postmessage method 1. Add two more string constants for success or failure of message sending 2. Create two constants for our two message types 3. Create the Handler and override the handlemessage method 4. Use a toast to indicate what happened

68 Now use a new Thread to do the upload

69 Your basic application is complete The full version of the application uses a Service to notify you of new messages which are nearby Source code is on the website For bonus points see if you can add a ProgressDialog

CS378 -Mobile Computing. Anatomy of and Android App and the App Lifecycle

CS378 -Mobile Computing. Anatomy of and Android App and the App Lifecycle CS378 -Mobile Computing Anatomy of and Android App and the App Lifecycle Hello Android Tutorial http://developer.android.com/resources/tutorials/hello-world.html Important Files src/helloandroid.java Activity

More information

Introduction To Android

Introduction To Android Introduction To Android Mobile Technologies Symbian OS ios BlackBerry OS Windows Android Introduction to Android Android is an operating system for mobile devices such as smart phones and tablet computers.

More information

CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu Android Activity LifeCycle Starting Activities Android applications don't start with a call to main(string[])

More information

Lab 1: Getting Started With Android Programming

Lab 1: Getting Started With Android Programming Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Eng. Jehad Aldahdooh Mobile Computing Android Lab Lab 1: Getting Started With Android Programming To create a new Android Project

More information

COLLEGE OF ENGINEERING, NASHIK-4

COLLEGE OF ENGINEERING, NASHIK-4 Pune Vidyarthi Griha s COLLEGE OF ENGINEERING, NASHIK-4 DEPARTMENT OF COMPUTER ENGINEERING 1) What is Android? Important Android Questions It is an open-sourced operating system that is used primarily

More information

CS378 - Mobile Computing. Anatomy of an Android App and the App Lifecycle

CS378 - Mobile Computing. Anatomy of an Android App and the App Lifecycle CS378 - Mobile Computing Anatomy of an Android App and the App Lifecycle Application Components five primary components different purposes and different lifecycles Activity single screen with a user interface,

More information

BCA 6. Question Bank

BCA 6. Question Bank BCA 6 030010601 : Introduction to Mobile Application Development Question Bank Unit 1: Introduction to Android and Development tools Short questions 1. What kind of tool is used to simulate Android application?

More information

Minds-on: Android. Session 2

Minds-on: Android. Session 2 Minds-on: Android Session 2 Paulo Baltarejo Sousa Instituto Superior de Engenharia do Porto 2016 Outline Activities UI Events Intents Practice Assignment 1 / 33 2 / 33 Activities Activity An activity provides

More information

Android Programming Lecture 2 9/7/2011

Android Programming Lecture 2 9/7/2011 Android Programming Lecture 2 9/7/2011 Creating a first app 1. Create a new Android project (a collection of source code and resources for the app) from the Eclipse file menu 2. Choose a project name (can

More information

Mobile Computing. Introduction to Android

Mobile Computing. Introduction to Android Mobile Computing Introduction to Android Mobile Computing 2011/2012 What is Android? Open-source software stack for mobile devices OS, middleware and key applications Based upon a modified version of the

More information

Android. Michael Greifeneder. Image source: Android homepage

Android. Michael Greifeneder. Image source: Android homepage Android Michael Greifeneder Image source: Android homepage Inhalt Overwiew Hardware Software Development Demo Tools Basics Debugging/Emulator Location Android And Me Why I like Android Blend of Linux and

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu Announcements Group formation: Projects 2, 3 and final project will be

More information

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna Programming with Android: System Architecture Luca Bedogni Marco Di Felice Dipartimento di Scienze dell Informazione Università di Bologna Outline Android Architecture: An Overview Android Dalvik Java

More information

COSC 3P97 Mobile Computing

COSC 3P97 Mobile Computing COSC 3P97 Mobile Computing Mobile Computing 1.1 COSC 3P97 Prerequisites COSC 2P13, 3P32 Staff instructor: Me! teaching assistant: Steve Tkachuk Lectures (MCD205) Web COSC: http://www.cosc.brocku.ca/ COSC

More information

Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore

Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore Android App Development Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore Mobile devices (e.g., smartphone, tablet PCs, etc.) are increasingly becoming an essential part of human life

More information

Lifecycle Callbacks and Intents

Lifecycle Callbacks and Intents SE 435: Development in the Android Environment Recitations 2 3 Semester 1 5779 4 Dec - 11 Dec 2018 Lifecycle Callbacks and Intents In this recitation we ll prepare a mockup tool which demonstrates the

More information

Android Development Tools = Eclipse + ADT + SDK

Android Development Tools = Eclipse + ADT + SDK Lesson 2 Android Development Tools = Eclipse + ADT + SDK Victor Matos Cleveland State University Portions of this page are reproduced from work created and shared by Google and used according to terms

More information

Android Ecosystem and. Revised v4presenter. What s New

Android Ecosystem and. Revised v4presenter. What s New Android Ecosystem and Revised v4presenter What s New Why Mobile? 5B 4B 3B 2B 1B Landlines PCs TVs Bank users Mobiles 225M AOL 180M 135M 90M 45M 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Quarters

More information

INTRODUCTION TO ANDROID

INTRODUCTION TO ANDROID INTRODUCTION TO ANDROID 1 Niv Voskoboynik Ben-Gurion University Electrical and Computer Engineering Advanced computer lab 2015 2 Contents Introduction Prior learning Download and install Thread Android

More information

Android Programmierung leichtgemacht. Lars Vogel

Android Programmierung leichtgemacht. Lars Vogel Android Programmierung leichtgemacht Lars Vogel Twitter: @vogella Lars Vogel Arbeitet als unabhängiger Eclipse und Android Berater und Trainer Arbeit zusätzlichen für SAP AG als Product Owner in einem

More information

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) Lecture 3: Android Life Cycle and Permission Entire Lifetime An activity begins its lifecycle when entering the oncreate() state If not interrupted

More information

Programming with Android: System Architecture. Luca Bedogni. Dipartimento di Scienze dell Informazione Università di Bologna

Programming with Android: System Architecture. Luca Bedogni. Dipartimento di Scienze dell Informazione Università di Bologna Programming with Android: System Architecture Luca Bedogni Dipartimento di Scienze dell Informazione Università di Bologna Outline Android Architecture: An Overview Android Java Virtual Machine Android

More information

Android Online Training

Android Online Training Android Online Training IQ training facility offers Android Online Training. Our Android trainers come with vast work experience and teaching skills. Our Android training online is regarded as the one

More information

EMBEDDED SYSTEMS PROGRAMMING Application Basics

EMBEDDED SYSTEMS PROGRAMMING Application Basics EMBEDDED SYSTEMS PROGRAMMING 2015-16 Application Basics APPLICATIONS Application components (e.g., UI elements) are objects instantiated from the platform s frameworks Applications are event driven ( there

More information

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna Programming with Android: System Architecture Luca Bedogni Marco Di Felice Dipartimento di Scienze dell Informazione Università di Bologna Outline Android Architecture: An Overview Android Dalvik Java

More information

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) Lecture 3: Android Life Cycle and Permission Android Lifecycle An activity begins its lifecycle when entering the oncreate() state If not

More information

Android Programming (5 Days)

Android Programming (5 Days) www.peaklearningllc.com Android Programming (5 Days) Course Description Android is an open source platform for mobile computing. Applications are developed using familiar Java and Eclipse tools. This Android

More information

CS 528 Mobile and Ubiquitous Computing Lecture 3: Android UI, WebView, Android Activity Lifecycle Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 3: Android UI, WebView, Android Activity Lifecycle Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 3: Android UI, WebView, Android Activity Lifecycle Emmanuel Agu Android UI Design Example GeoQuiz App Reference: Android Nerd Ranch, pgs 1 30 App presents

More information

CS 234/334 Lab 1: Android Jump Start

CS 234/334 Lab 1: Android Jump Start CS 234/334 Lab 1: Android Jump Start Distributed: January 7, 2014 Due: Friday, January 10 or Monday, January 13 (in-person check off in Mobile Lab, Ry 167). No late assignments. Introduction The goal of

More information

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml Understand applications and their components activity service broadcast receiver content provider intent AndroidManifest.xml Android Application Written in Java (it s possible to write native code) Good

More information

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi ACTIVITY, FRAGMENT, NAVIGATION Roberto Beraldi Introduction An application is composed of at least one Activity GUI It is a software component that stays behind a GUI (screen) Activity It runs inside the

More information

Mobile Application Development - Android

Mobile Application Development - Android Mobile Application Development - Android MTAT.03.262 Satish Srirama satish.srirama@ut.ee Goal Give you an idea of how to start developing Android applications Introduce major Android application concepts

More information

CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu Fragments Recall: Fragments Sub-components of an Activity (screen) An activity can contain multiple fragments, organized

More information

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION Course Title: Java Technologies Grades: 10-12 Prepared by: Rob Case Course Unit: What is Java? Learn about the history of Java. Learn about compilation & Syntax. Discuss the principles of Java. Discuss

More information

Android Application Development

Android Application Development Android Application Development Octav Chipara What is Android A free, open source mobile platform A Linux-based, multiprocess, multithreaded OS Android is not a device or a product It s not even limited

More information

Android Basics. Android UI Architecture. Android UI 1

Android Basics. Android UI Architecture. Android UI 1 Android Basics Android UI Architecture Android UI 1 Android Design Constraints Limited resources like memory, processing, battery à Android stops your app when not in use Primarily touch interaction à

More information

CS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L

CS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L CS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L 2 0 1 5 Activity Basics Manifest File AndroidManifest.xml Central configuration of Android application Defines: Name of application Icon for

More information

MC Android Programming

MC Android Programming MC1921 - Android Programming Duration: 5 days Course Price: $3,395 Course Description Android is an open source platform for mobile computing. Applications are developed using familiar Java and Eclipse

More information

Android development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2.

Android development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2. Outline 1. Set up Android Studio Android development Tiberiu Vilcu Prepared for EECS 411 Sugih Jamin 15 September 2017 2. Create sample app 3. Add UI to see how the design interface works 4. Add some code

More information

Java Training Center - Android Application Development

Java Training Center - Android Application Development Java Training Center - Android Application Development Android Syllabus and Course Content (3 months, 2 hour Daily) Introduction to Android Android and it's feature Android releases and Versions Introduction

More information

Android Fundamentals - Part 1

Android Fundamentals - Part 1 Android Fundamentals - Part 1 Alexander Nelson September 1, 2017 University of Arkansas - Department of Computer Science and Computer Engineering Reminders Projects Project 1 due Wednesday, September 13th

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 5: Rotating Device, Saving Data, Intents and Fragments Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 5: Rotating Device, Saving Data, Intents and Fragments Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 5: Rotating Device, Saving Data, Intents and Fragments Emmanuel Agu Administrivia Moved back deadlines for projects 2, 3 and final project See updated schedule

More information

ANDROID APPS (NOW WITH JELLY BEANS!) Jordan Jozwiak November 11, 2012

ANDROID APPS (NOW WITH JELLY BEANS!) Jordan Jozwiak November 11, 2012 ANDROID APPS (NOW WITH JELLY BEANS!) Jordan Jozwiak November 11, 2012 AGENDA Android v. ios Design Paradigms Setup Application Framework Demo Libraries Distribution ANDROID V. IOS Android $25 one-time

More information

Mobile OS. Symbian. BlackBerry. ios. Window mobile. Android

Mobile OS. Symbian. BlackBerry. ios. Window mobile. Android Ing. Elton Domnori December 7, 2011 Mobile OS Symbian BlackBerry Window mobile Android ios Mobile OS OS First release Last release Owner Android Android 1.0 September 2008 Android 4.0 May 2011 Open Handset

More information

Lab 1 - Setting up the User s Profile UI

Lab 1 - Setting up the User s Profile UI Lab 1 - Setting up the User s Profile UI Getting started This is the first in a series of labs that allow you to develop the MyRuns App. The goal of the app is to capture and display (using maps) walks

More information

Getting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering

Getting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering Getting Started Dr. Miguel A. Labrador Department of Computer Science & Engineering labrador@csee.usf.edu http://www.csee.usf.edu/~labrador 1 Goals Setting up your development environment Android Framework

More information

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1 Android Lesson 1 1 1 1.0 to Android 2 Contents Android is an ecosystem Android platform architecture Android Versions Challenges of Android app development App fundamentals 3 Android Ecosystem 4 What is

More information

Android" Application Development SAMS. Sams Teach Yourself. Shane Conder. Lauren Darcey. Second Edition

Android Application Development SAMS. Sams Teach Yourself. Shane Conder. Lauren Darcey. Second Edition Lauren Darcey Shane Conder Sams Teach Yourself Android" Application Development Second Edition SAMS 800 East 96th Street, Indianapolis, Indiana, 46240 USA Table of Contents Introduction 1 Who Should Read

More information

Introduction to Android development

Introduction to Android development Introduction to Android development Manifesto Digital We re an award winning London based digital agency that loves ideas design and technology We aim to make people s lives better, easier, fairer, more

More information

UNDERSTANDING ACTIVITIES

UNDERSTANDING ACTIVITIES Activities Activity is a window that contains the user interface of your application. An Android activity is both a unit of user interaction - typically filling the whole screen of an Android mobile device

More information

Embedded Systems Programming - PA8001

Embedded Systems Programming - PA8001 Embedded Systems Programming - PA8001 http://goo.gl/ydeczu Lecture 8 Mohammad Mousavi m.r.mousavi@hh.se Center for Research on Embedded Systems School of Information Science, Computer and Electrical Engineering

More information

Android-Basics. Praktikum Mobile und Verteilte Systeme. Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld

Android-Basics. Praktikum Mobile und Verteilte Systeme. Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld Praktikum Mobile und Verteilte Systeme Android-Basics Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld http://www.mobile.ifi.lmu.de WS 2017/18 Programming with Android Today: Android basics

More information

ATC Android Application Development

ATC Android Application Development ATC Android Application Development 1. Android Framework and Android Studio b. Android Platform Architecture i. Linux Kernel ii. Hardware Abstraction Layer(HAL) iii. Android runtime iv. Native C/C++ Libraries

More information

Application Fundamentals

Application Fundamentals Application Fundamentals CS 2046 Mobile Application Development Fall 2010 Announcements CMS is up If you did not get an email regarding this, see me after class or send me an email. Still working on room

More information

Fragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment

Fragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment FRAGMENTS Fragments An activity is a container for views When you have a larger screen device than a phone like a tablet it can look too simple to use phone interface here. Fragments Mini-activities, each

More information

Android App Development

Android App Development Android App Development Outline Introduction Android Fundamentals Android Studio Tutorials Introduction What is Android? A software platform and operating system for mobile devices Based on the Linux kernel

More information

Praktikum Mobile und Verteilte Systeme. Android-Basics. Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld

Praktikum Mobile und Verteilte Systeme. Android-Basics. Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld Praktikum Mobile und Verteilte Systeme Android-Basics Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld http://www.mobile.ifi.lmu.de SoSe 2018 Programming with Android Today: Android basics

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android. Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android. Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android Emmanuel Agu What is Android? Android is world s leading mobile operating system Open source Google: Owns Android, maintains it,

More information

Real-Time Embedded Systems

Real-Time Embedded Systems Real-Time Embedded Systems DT8025, Fall 2016 http://goo.gl/azfc9l Lecture 8 Masoumeh Taromirad m.taromirad@hh.se Center for Research on Embedded Systems School of Information Technology 1 / 51 Smart phones

More information

GUI Design for Android Applications

GUI Design for Android Applications GUI Design for Android Applications SE3A04 Tutorial Jason Jaskolka Department of Computing and Software Faculty of Engineering McMaster University Hamilton, Ontario, Canada jaskolj@mcmaster.ca November

More information

CMSC436: Fall 2013 Week 3 Lab

CMSC436: Fall 2013 Week 3 Lab CMSC436: Fall 2013 Week 3 Lab Objectives: Familiarize yourself with the Activity class, the Activity lifecycle, and the Android reconfiguration process. Create and monitor a simple application to observe

More information

University of Babylon - College of IT SW Dep. - Android Assist. Lect. Wadhah R. Baiee Activities

University of Babylon - College of IT SW Dep. - Android Assist. Lect. Wadhah R. Baiee Activities Activities Ref: Wei-Meng Lee, BEGINNING ANDROID 4 APPLICATION DEVELOPMENT, Ch2, John Wiley & Sons, 2012 An application can have zero or more activities. Typically, applications have one or more activities;

More information

Android Programming - Jelly Bean

Android Programming - Jelly Bean 1800 ULEARN (853 276) www.ddls.com.au Android Programming - Jelly Bean Length 5 days Price $4235.00 (inc GST) Overview This intensive, hands-on five-day course teaches programmers how to develop activities,

More information

Computer Science E-76 Building Mobile Applications

Computer Science E-76 Building Mobile Applications Computer Science E-76 Building Mobile Applications Lecture 3: [Android] The SDK, Activities, and Views February 13, 2012 Dan Armendariz danallan@mit.edu 1 http://developer.android.com Android SDK and NDK

More information

Android App Development

Android App Development Android App Development Course Contents: Android app development Course Benefit: You will learn how to Use Advance Features of Android with LIVE PROJECTS Original Fees: 15000 per student. Corporate Discount

More information

ORACLE UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

ORACLE UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP) Android Syllabus Pre-requisite: C, C++, Java Programming SQL & PL SQL Chapter 1: Introduction to Android Introduction to android operating system History of android operating system Features of Android

More information

Android App Development. Ahmad Tayeb

Android App Development. Ahmad Tayeb Android App Development Ahmad Tayeb Ahmad Tayeb Lecturer @ Department of Information Technology, Faculty of Computing and Information Technology, KAU Master degree from Information Sciences and Technologies,

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie User Interface Design" & Development -

More information

CS 403X Mobile and Ubiquitous Computing Lecture 3: Introduction to Android Programming Emmanuel Agu

CS 403X Mobile and Ubiquitous Computing Lecture 3: Introduction to Android Programming Emmanuel Agu CS 403X Mobile and Ubiquitous Computing Lecture 3: Introduction to Android Programming Emmanuel Agu Android UI Tour Home Screen First screen, includes favorites tray (e.g phone, mail, messaging, web, etc)

More information

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings. Hello World Lab Objectives: Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.xml What to Turn in: The lab evaluation

More information

Activities and Fragments

Activities and Fragments Activities and Fragments 21 November 2017 Lecture 5 21 Nov 2017 SE 435: Development in the Android Environment 1 Topics for Today Activities UI Design and handlers Fragments Source: developer.android.com

More information

Android Beginners Workshop

Android Beginners Workshop Android Beginners Workshop at the M O B IL E M O N D AY m 2 d 2 D E V E L O P E R D A Y February, 23 th 2010 Sven Woltmann, AndroidPIT Sven Woltmann Studied Computer Science at the TU Ilmenau, 1994-1999

More information

Building User Interface for Android Mobile Applications II

Building User Interface for Android Mobile Applications II Building User Interface for Android Mobile Applications II Mobile App Development 1 MVC 2 MVC 1 MVC 2 MVC Android redraw View invalidate Controller tap, key pressed update Model MVC MVC in Android View

More information

Android-Basics. Praktikum Mobile und Verteilte Systeme

Android-Basics. Praktikum Mobile und Verteilte Systeme Praktikum Mobile und Verteilte Systeme Android-Basics Prof. Dr. Claudia Linnhoff-Popien André Ebert, Thomy Phan, Robert Müller, Steffen Illium http://www.mobile.ifi.lmu.de WS 2018/19 Programming with Android

More information

Lab 3. Accessing GSM Functions on an Android Smartphone

Lab 3. Accessing GSM Functions on an Android Smartphone Lab 3 Accessing GSM Functions on an Android Smartphone 1 Lab Overview 1.1 Goals The objective of this practical exercise is to create an application for a smartphone with the Android mobile operating system,

More information

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi ACTIVITY, FRAGMENT, NAVIGATION Roberto Beraldi View System A system for organizing GUI Screen = tree of views. View = rectangular shape on the screen that knows how to draw itself wrt to the containing

More information

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license Android Android Mobile operating system developed by Google A complete stack OS, framework A rich set of applications Email, calendar, browser, maps, text messaging, contacts, camera, dialer, music player,

More information

Programming in Android. Nick Bopp

Programming in Android. Nick Bopp Programming in Android Nick Bopp nbopp@usc.edu Types of Classes Activity This is the main Android class that you will be using. These are actively displayed on the screen and allow for user interaction.

More information

Started with Android Programming for Tablets

Started with Android Programming for Tablets 1Getting Started with Android Programming for Tablets WHAT YOU WILL LEARN IN THIS CHAPTER What is Android? Android versions and its feature set The Android architecture The various Android devices on the

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android Programming. Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android Programming. Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android Programming Emmanuel Agu Android Apps: Big Picture UI Design using XML UI design code (XML) separate from the program (Java) Why?

More information

Chapter 2 Welcome App

Chapter 2 Welcome App 2.8 Internationalizing Your App 1 Chapter 2 Welcome App 2.1 Introduction a. Android Studio s layout editor enables you to build GUIs using drag-and-drop techniques. b. You can edit the GUI s XML directly.

More information

Mobile development initiation

Mobile development initiation Mobile development initiation Outline Mobile development: o Why? o How? o New issues Android ios 2 Mobile growth ¼ Internet access Sales of smartphones and tablets increase o + 70% tab Community 3 Why

More information

Androidfp_printOnly.book Page vii Tuesday, October 4, :15 AM. Contents. Before You Begin

Androidfp_printOnly.book Page vii Tuesday, October 4, :15 AM. Contents. Before You Begin Androidfp_printOnly.book Page vii Tuesday, October 4, 2011 9:15 AM Preface Before You Begin xiv xxii 1 Introduction to Android 1 1.1 Introduction 2 1.2 Android Overview 4 1.3 Android 2.2 (Froyo) 7 1.4

More information

Praktikum Entwicklung Mediensysteme. Implementing a User Interface

Praktikum Entwicklung Mediensysteme. Implementing a User Interface Praktikum Entwicklung Mediensysteme Implementing a User Interface Outline Introduction Programmatic vs. XML Layout Common Layout Objects Hooking into a Screen Element Listening for UI Notifications Applying

More information

CS260 Intro to Java & Android 04.Android Intro

CS260 Intro to Java & Android 04.Android Intro CS260 Intro to Java & Android 04.Android Intro Winter 2015 Winter 2015 CS260 - Intro to Java & Android 1 Android - Getting Started Android SDK contains: API Libraries Developer Tools Documentation Sample

More information

Android Essentials with Java

Android Essentials with Java Android Essentials with Java Before You Program o Exercise in algorithm generation Getting Started o Using IntelliJ CE Using Variables and Values o Store data in typed variables Static Methods o Write

More information

Figure 2.10 demonstrates the creation of a new project named Chapter2 using the wizard.

Figure 2.10 demonstrates the creation of a new project named Chapter2 using the wizard. 44 CHAPTER 2 Android s development environment Figure 2.10 demonstrates the creation of a new project named Chapter2 using the wizard. TIP You ll want the package name of your applications to be unique

More information

1. What are the key components of Android Architecture? 2. What are the advantages of having an emulator within the Android environment?

1. What are the key components of Android Architecture? 2. What are the advantages of having an emulator within the Android environment? 1. What are the key components of Android Architecture? Android Architecture consists of 4 key components: - Linux Kernel - Libraries - Android Framework - Android Applications 2. What are the advantages

More information

IGEEKS TECHNOLOGIES. Software Training Division. Academic Live Projects For BE,ME,MCA,BCA and PHD Students

IGEEKS TECHNOLOGIES. Software Training Division. Academic Live Projects For BE,ME,MCA,BCA and PHD Students Duration:40hours IGEEKS TECHNOLOGIES Software Training Division Academic Live Projects For BE,ME,MCA,BCA and PHD Students IGeekS Technologies (Make Final Year Project) No: 19, MN Complex, 2nd Cross, Sampige

More information

Tutorial on Basic Android Setup

Tutorial on Basic Android Setup Tutorial on Basic Android Setup EE368/CS232 Digital Image Processing, Spring 2015 Linux Version Introduction In this tutorial, we will learn how to set up the Android software development environment and

More information

COMP4521 EMBEDDED SYSTEMS SOFTWARE

COMP4521 EMBEDDED SYSTEMS SOFTWARE COMP4521 EMBEDDED SYSTEMS SOFTWARE LAB 1: DEVELOPING SIMPLE APPLICATIONS FOR ANDROID INTRODUCTION Android is a mobile platform/os that uses a modified version of the Linux kernel. It was initially developed

More information

Android System Architecture. Android Application Fundamentals. Applications in Android. Apps in the Android OS. Program Model 8/31/2015

Android System Architecture. Android Application Fundamentals. Applications in Android. Apps in the Android OS. Program Model 8/31/2015 Android System Architecture Android Application Fundamentals Applications in Android All source code, resources, and data are compiled into a single archive file. The file uses the.apk suffix and is used

More information

Android. (XKE Mars 2009) Erwan Alliaume.

Android. (XKE Mars 2009) Erwan Alliaume. Android (XKE Mars 2009) Erwan Alliaume ealliaume(*at*)xebia(*dot*)fr http://www.xebia.fr http://blog.xebia.fr History August 2005 Google acquires Android November 2007 Open Handset Alliance announcement

More information

Introduction to Android

Introduction to Android Introduction to Android Ambient intelligence Teodoro Montanaro Politecnico di Torino, 2016/2017 Disclaimer This is only a fast introduction: It is not complete (only scrapes the surface) Only superficial

More information

CS 528 Mobile and Ubiquitous Computing Lecture 1b: Introduction to Android. Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 1b: Introduction to Android. Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 1b: Introduction to Android Emmanuel Agu What is Android? Android is world s leading mobile operating system Open source (https://source.android.com/setup/)

More information

States of Activities. Active Pause Stop Inactive

States of Activities. Active Pause Stop Inactive noname Conceptual Parts States of Activities Active Pause Stop Inactive Active state The state that the activity is on the most foreground and having a focus. This is in Active state. Active state The

More information

User Interface: Layout. Asst. Prof. Dr. Kanda Runapongsa Saikaew Computer Engineering Khon Kaen University

User Interface: Layout. Asst. Prof. Dr. Kanda Runapongsa Saikaew Computer Engineering Khon Kaen University User Interface: Layout Asst. Prof. Dr. Kanda Runapongsa Saikaew Computer Engineering Khon Kaen University http://twitter.com/krunapon Agenda User Interface Declaring Layout Common Layouts User Interface

More information

CS 4330/5390: Mobile Application Development Exam 1

CS 4330/5390: Mobile Application Development Exam 1 1 Spring 2017 (Thursday, March 9) Name: CS 4330/5390: Mobile Application Development Exam 1 This test has 8 questions and pages numbered 1 through 7. Reminders This test is closed-notes and closed-book.

More information

Lecture 2 Android SDK

Lecture 2 Android SDK Lecture 2 Android SDK This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a

More information

Diploma in Android Programming (DAP)

Diploma in Android Programming (DAP) Diploma in Android Programming (DAP) Duration: 01 Year Total credit: 32 1 st Semester (DAP) Theory Course Course Title (T-L-P) Credit Code CSP-80 Operating Systems T 04 CSP-45 Programing in JAVA T 04 CSP-46

More information