Android Fundamentals - Part 1

Size: px
Start display at page:

Download "Android Fundamentals - Part 1"

Transcription

1 Android Fundamentals - Part 1 Alexander Nelson September 1, 2017 University of Arkansas - Department of Computer Science and Computer Engineering

2 Reminders

3 Projects Project 1 due Wednesday, September 13th Link Choose a project idea and team for the final project ASAP First project report is due September 15th

4 Android OS Platform Architecture

5 Android Stack Used by Fair Use under Creative Commons Attribution 2.5

6 Android Stack

7 Linux Kernel Android is based on the Linux kernel All lower-level functionality is handled by Kernel Provides consistent functionality across devices Maintains standard security practices No need to reinvent the wheel

8 Hardware Abstraction Layer (HAL) Standard set of interfaces from device hardware to Java APIs Consists of library modules Modules are loaded when API makes call to access hardware

9 Android Runtime (ART) Managed runtime environment of an application Beginning with Android 5.0, each app runs in its own process and its own instance of ART Each process runs in its own VM, and is thus isolated from other applications Includes core Java libraries for most of the Java functionality

10 Native C/C++ Libraries Android system components are built from native code and require support libraries Android provides Java framework APIs to expose some funcitonality to these libraries e.g. OpenGL ES can be accessed through Java OpenGL API for graphics

11 Java API Framework Entire Android OS feature-set available through Java APIs including: View System to build UI (XML defined) Resource manager - Access to non-code resources Notification manager - All apps can display alerts Activity manager - Manage lifecycle of apps Content Providers - Enable cross application sharing

12 System Applications Core set of applications provided by OS e.g. Camera, SMS, , Calendar, Calls, etc... No special status among apps Provide capabilities developers can access from their own app

13 Application Fundamentals

14 Application & OS OS Security Features: Multi-user Linux system each app is a different user System assigns each app a unique user ID Permissions are set for files such that only the assigned app can access them Each process has own VM App code run in isolation

15 Application & OS Process Cycle: Each app runs in its own Linux process Android starts the process when any app component is needed Shuts down process when finished, or memory is needed elsewhere

16 Principle of Least Privilege Each app, by default, has acess only to the components that it requires, and nothing more! Exceptions: Two apps can share the same Linux user ID Can access each other s files Can run in the same process and same VM Must be signed with the same certificate e.g. Facebook & Messenger App can request permission to access device data User must grant these permissions explicitly

17 Application Components Four different types of Application components: Activities Services Broadcast Receivers Content Providers

18 Activities

19 Activity Entry point for interacting with the user Typically represents a single screen with a UI Mutliple activities can come together to create a single application Example: application Inbox Screen Compose Settings

20 Activies (continued) An activity facilitates key interactions between the system and the application, including: Keeping track of what the user is currently focused on Helping the app handle having its process killed Providing a way for apps to implement user flowss between each other

21 Activities (continued) To be used, an activity must be declared in the application manifest Example: <m a n i f e s t... > <a p p l i c a t i o n... > < a c t i v i t y android:name=. E x a m p l e A c t i v i t y />... </ a p p l i c a t i o n... >... </ m a n i f e s t >

22 Activitiy Attributes Attributes can define certain interactions about the activity Contained inside the activity tag The only required attribute for an activity is android:name This specifies the class name of the activity Think these names through! They should not change after publishing your applications!

23 Activitiy Attributes (continued) Other attributes you may want to include in the manifest: Intent filters (Will discuss later) Permissions Screen Orientation Icon

24 Activity Lifecycle

25 Activity Lifecycle An activity will transition through a number of states during its lifetime A series of callbacks are used to handle transitions oncreate() onstart() onresume() onrestart() onpause() onstop() ondestroy()

26 oncreate() Callback which fires when the system creates the activity You must implement this callback! This callback should initialize the essential components: Create views Bind data Calls setcontentview() which defines the layout for the UI After returining, the next callback is always onstart()

27 onstart() Activity becomes visible to the user Final preparations before coming to the foreground and becoming interactive Followed by onresume()

28 onresume() Invoked when the activity starts interacting with the user Most of the App s core functionality implemented here At this point the activity is on the top of the activity stack and captures all user input

29 onpause() Called when activity loses focus and enters Paused state e.g. When the user hits the back button The activity is still partially visible and can (should?) continue to update If the user returns to the activity, onresume() will be called onstop() is called if the activity beomes no longer visible

30 onstop() Called when activity becomes no longer visible to user e.g. When activity being destroyed, new activity starting, existing activity being resumed If the activity comes back to the foreground, onrestart() is called ondestroy() is called if the activity is completely termininating.

31 onrestart() Called when a stopped actibity is about to restart e.g. When activity is brought back to the foreground Restores the state of the activity from when it was stopped Always followed by onstart()

32 ondestroy() ondestroy() is invoked before the activity is destroyed Implemented to ensure that all the activities resources are released This is the final state in the activity lifecycle Must be recreated to start again

33 Services

34 Service Application component that can perform long-running operations in the background Does not provide a user interface! Another app component can start a service The service continues to run in the background even after activity change Components can bind to a service to interact & perform interprocess communication

35 Services There are three different types of services: Foreground Background Bound

36 Foreground Service Performs some operation that is noticable to the user e.g. Audio app uses foreground service to play music Must display a status bar icon Continue running even when user isn t interacting with the app

37 Background Service Performs operations not directly noticed by user e.g. Compress file storage for application Caveat: Starting with API 26, background services have restrictions when the app is not in the foreground Often better to use a scheduled job instead

38 Bound Service A service becomes bound when app component uses bindservice() Offers a client-server interface for interacting with the service Only runs when another application is bound to it!

39 Declaring Services To be used, an service must be declared in the application manifest Example: <m a n i f e s t... > <a p p l i c a t i o n... > <s e r v i c e android:name=. E x a m p l e S e r v... </ a p p l i c a t i o n... > </ m a n i f e s t >

40 Service Lifecycle

41 onstartcommand() One way to start an Android service System invokes this by calling startservice() from another component startservice() takes Intent as argument onstartcommand() takes Intent, flags, and startid If this is implemented, you must stop the service when work is complete by calling stopself() or stopservice()

42 Started Services A started service is one that is created when a component calls startservice() Lifecycle of the service is independent of the component which creates it! App components create services by calling startservice() and passing an Intent object specifying the targeted Service

43 Started Services (continued) By default started services run in the same process in the main thread of the application in which it is declared If the service is blocking while the user is to be interacting with the app, start a new thread within the service

44 Started Services (continued) It is best to start a service by extending the IntentService class The IntentService class does the following: Creates default worker thread that executes all intents delivered to the onstartcommand() Creates a work queue that passes one intent at a time to your onhandleintent() implementation, so you never have to worry about multi-threading Stops the service after all of the start requests are handled, so you never have to call stopself() Provides a default implementation of onbind() that returns null Provides a default implementation of onstartcommand() that sends the intent to the work queue and then to your onhandleintent() implementation

45 Example IntentService

46 Extending Intent Service All you need (as shown by previous example): Constructor Implementation of onhandleintent() You may also override callbacks, but you must call the super implementation

47 Starting a Service You create a Started Service by calling startservice() and passing an intent object

48 Stopping a Service Started services must manage their own lifecycle The system will not stop or destory a service unless it must recover memory Services must stop itself by calling stopself() or another component may stop it by calling stopservice() If your service is potentially used by multiple components concurrently: Use stopself(int) where the passed integer is the ID of the start request

49 onbind() Other way to start an Android Service Calledc when another component calls bindservice() You must provide an interface to communicate between client and service IBinder object provides this, by extending the Binder class

50 Bound Services Bound services are to be used when you want your service to interact with other components through Interprocess Communication (IPC) Use onbind() callback to create a bound service onbind() returns an IBinder object defining the interface for communication

51 Bound Services Multiple components may bind with a service, and have a reference to the same IBinder object When a client is finished with the service, it calls unbindservice() to unbind You do not need to stop a bound service! Bound services terminate when no clients are connected

52 oncreate() Invoked by the system before onstartcommand() or onbind() Perform one-time setup procedures Not called if service is already running!

53 ondestroy() Invoked by the system before when Service is no longer needed Should be implemented to clean up any resources (threads, registered listeners, receivers) Last call that the service will receive

54 Service Stop Conditions Service started by calling startservice() will run until stopped by stopself() or another component calls stopservice() Service started by bindservice() will run as long as the component is bound to it Force-stop conditions If memory is low and system resources must be recovered Bound services to app in focus less likely to be killed Foreground services are rarely killed Long-running started services are highly susceptible to being killed

55 Notifications Services may communicate to the user with: Toast Notifications Status Bar Notifications

56 Foreground Services Foreground services are services the user is actively aware of Must provide a notification for the status bar under the Ongoing heading! Notification cannot be dismissed unless service is stopped or removed from foreground ex. Music player should be foreground Notification shows current song Can interact to launch the music player

57 Starting a foreground service Request to run service in foreground with startforeground() Takes two parameters: Integer to uniquely identify the notification A Notification object for the status bar Notification object must have priority of PRIORITY LOW or higher

58 Foreground Service Example

59 Removing Service from Foreground To remove service from foreground: Call stopforeground() stopforeground() takes a boolean argument which indicates whether to remove the status bar notification Removing service from foreground does not stop the service!

Services are software components designed specifically to perform long background operations.

Services are software components designed specifically to perform long background operations. SERVICES Service Services are software components designed specifically to perform long background operations. such as downloading a file over an internet connection or streaming music to the user, but

More information

Services. Background operating component without a visual interface Running in the background indefinitely

Services. Background operating component without a visual interface Running in the background indefinitely Services Background operating component without a visual interface Running in the background indefinitely Differently from Activity, Service in Android runs in background, they don t have an interface

More information

Software Practice 3 Today s lecture Today s Task

Software Practice 3 Today s lecture Today s Task 1 Software Practice 3 Today s lecture Today s Task Prof. Hwansoo Han T.A. Jeonghwan Park 43 2 MULTITHREAD IN ANDROID 3 Activity and Service before midterm after midterm 4 Java Thread Thread is an execution

More information

CS378 -Mobile Computing. Services and Broadcast Receivers

CS378 -Mobile Computing. Services and Broadcast Receivers CS378 -Mobile Computing Services and Broadcast Receivers Services One of the four primary application components: activities content providers services broadcast receivers 2 Services Application component

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

ANDROID SERVICES, BROADCAST RECEIVER, APPLICATION RESOURCES AND PROCESS

ANDROID SERVICES, BROADCAST RECEIVER, APPLICATION RESOURCES AND PROCESS ANDROID SERVICES, BROADCAST RECEIVER, APPLICATION RESOURCES AND PROCESS 1 Instructor: Mazhar Hussain Services A Service is an application component that can perform long-running operations in the background

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

EMBEDDED SYSTEMS PROGRAMMING Android Services

EMBEDDED SYSTEMS PROGRAMMING Android Services EMBEDDED SYSTEMS PROGRAMMING 2016-17 Android Services APP COMPONENTS Activity: a single screen with a user interface Broadcast receiver: responds to system-wide broadcast events. No user interface Service:

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

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

MOBILE APPLICATION DEVELOPMENT LECTURE 10 SERVICES IMRAN IHSAN ASSISTANT PROFESSOR

MOBILE APPLICATION DEVELOPMENT LECTURE 10 SERVICES IMRAN IHSAN ASSISTANT PROFESSOR MOBILE APPLICATION DEVELOPMENT LECTURE 10 SERVICES IMRAN IHSAN ASSISTANT PROFESSOR WWW.IMRANIHSAN.COM Android Component A Service is an application component that runs in the background, not interacting

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

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

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 Android Anatomy Android Anatomy 2! Agenda

More information

Overview of Activities

Overview of Activities d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee, USA CS 282 Principles of Operating Systems II Systems Programming

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

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

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

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

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

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 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

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

Activities. https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities

Activities. https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities Activities https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities Overview What is an Activity Starting and stopping activities The Back Stack

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

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

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

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

Android Activities. Akhilesh Tyagi

Android Activities. Akhilesh Tyagi Android Activities Akhilesh Tyagi Apps, memory, and storage storage: Your device has apps and files installed andstoredonitsinternaldisk,sdcard,etc. Settings Storage memory: Some subset of apps might be

More information

Android. Broadcasts Services Notifications

Android. Broadcasts Services Notifications Android Broadcasts Services Notifications Broadcast receivers Application components that can receive intents from other applications Broadcast receivers must be declared in the manifest They have an associated

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

Mobile Programming Practice Background processing AsynTask Service Broadcast receiver Lab #5

Mobile Programming Practice Background processing AsynTask Service Broadcast receiver Lab #5 1 Mobile Programming Practice Background processing AsynTask Service Broadcast receiver Lab #5 Prof. Hwansoo Han T.A. Sung-in Hong T.A. Minseop Jeong 2 Background processing Every Android app has a main

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 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

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

Android Services & Local IPC: Overview of Programming Bound Services

Android Services & Local IPC: Overview of Programming Bound Services : Overview of Programming Bound Services d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Professor of Computer Science Institute for Software Integrated Systems Vanderbilt University Nashville,

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

Services. Marco Ronchetti Università degli Studi di Trento

Services. Marco Ronchetti Università degli Studi di Trento 1 Services Marco Ronchetti Università degli Studi di Trento Service An application component that can perform longrunning operations in the background and does not provide a user interface. So, what s

More information

2017 Pearson Educa2on, Inc., Hoboken, NJ. All rights reserved.

2017 Pearson Educa2on, Inc., Hoboken, NJ. All rights reserved. Operating Systems: Internals and Design Principles Chapter 4 Threads Ninth Edition By William Stallings Processes and Threads Resource Ownership Process includes a virtual address space to hold the process

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

Understanding Application

Understanding Application Introduction to Android Application Development, Android Essentials, Fifth Edition Chapter 4 Understanding Application Components Chapter 4 Overview Master important terminology Learn what the application

More information

Lifecycle-Aware Components Live Data ViewModel Room Library

Lifecycle-Aware Components Live Data ViewModel Room Library Lifecycle-Aware Components Live Data ViewModel Room Library Multiple entry points launched individually Components started in many different orders Android kills components on reconfiguration / low memory

More information

LECTURE NOTES OF APPLICATION ACTIVITIES

LECTURE NOTES OF APPLICATION ACTIVITIES Department of Information Networks The University of Babylon LECTURE NOTES OF APPLICATION ACTIVITIES By College of Information Technology, University of Babylon, Iraq Samaher@inet.uobabylon.edu.iq The

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

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

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

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

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

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

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

application components

application components What you need to know for Lab 1 code to publish workflow application components activities An activity is an application component that provides a screen with which users can interact in order to do something,

More information

Introduction to Android

Introduction to Android Introduction to Android Ambient intelligence Alberto Monge Roffarello Politecnico di Torino, 2017/2018 Some slides and figures are taken from the Mobile Application Development (MAD) course Disclaimer

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. 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

Fragments and the Maps API

Fragments and the Maps API Fragments and the Maps API Alexander Nelson October 6, 2017 University of Arkansas - Department of Computer Science and Computer Engineering Fragments Fragments Fragment A behavior or a portion of a user

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 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 Overview. Most of the material in this section comes from

Android Overview. Most of the material in this section comes from Android Overview Most of the material in this section comes from http://developer.android.com/guide/ Android Overview A software stack for mobile devices Developed and managed by Open Handset Alliance

More information

Introduction to Android

Introduction to Android Introduction to Android http://myphonedeals.co.uk/blog/33-the-smartphone-os-complete-comparison-chart www.techradar.com/news/phone-and-communications/mobile-phones/ios7-vs-android-jelly-bean-vs-windows-phone-8-vs-bb10-1159893

More information

CE881: Mobile & Social Application Programming

CE881: Mobile & Social Application Programming CE881: Mobile & Social Application Programming, s, s and s Jialin Liu Senior Research Officer Univerisity of Essex 6 Feb 2017 Recall of lecture 3 and lab 3 :) Please download Kahoot or open a bowser and

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

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

UI Fragment.

UI Fragment. UI Fragment 1 Contents Fragments Overviews Lifecycle of Fragments Creating Fragments Fragment Manager and Transactions Adding Fragment to Activity Fragment-to-Fragment Communication Fragment SubClasses

More information

Security Philosophy. Humans have difficulty understanding risk

Security Philosophy. Humans have difficulty understanding risk Android Security Security Philosophy Humans have difficulty understanding risk Safer to assume that Most developers do not understand security Most users do not understand security Security philosophy

More information

1. GOALS and MOTIVATION

1. GOALS and MOTIVATION AppSeer: Discovering Interface Defects among Android Components Vincenzo Chiaramida, Francesco Pinci, Ugo Buy and Rigel Gjomemo University of Illinois at Chicago 4 September 2018 Slides by: Vincenzo Chiaramida

More information

Android Services & Local IPC: The Command Processor Pattern (Part 1)

Android Services & Local IPC: The Command Processor Pattern (Part 1) : The Command Processor Pattern (Part 1) d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Professor of Computer Science Institute for Software Integrated Systems Vanderbilt University Nashville,

More information

Xin Pan. CSCI Fall

Xin Pan. CSCI Fall Xin Pan CSCI5448 2011 Fall Outline Introduction of Android System Four primary application components AndroidManifest.xml Introduction of Android Sensor Framework Package Interface Classes Examples of

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 System Development Day-4. Team Emertxe

Android System Development Day-4. Team Emertxe Android System Development Day-4 Team Emertxe Android System Service Table of Content Introduction to service Inter Process Communication (IPC) Adding Custom Service Writing Custom HAL Compiling SDK Testing

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

ios vs Android By: Group 2

ios vs Android By: Group 2 ios vs Android By: Group 2 The ios System Memory Section A43972 Delta Core OS Layer Core Services Layer Media Layer CoCoa Touch Layer Memory Section A43972 Delta Aaron Josephs Core OS Layer - Core OS has

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

Lecture 3 Android Internals

Lecture 3 Android Internals Lecture 3 Android Internals 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

More information

Programming with Android: Notifications, Threads, Services. Luca Bedogni. Dipartimento di Scienze dell Informazione Università di Bologna

Programming with Android: Notifications, Threads, Services. Luca Bedogni. Dipartimento di Scienze dell Informazione Università di Bologna Programming with Android: Notifications, Threads, Dipartimento di Scienze dell Informazione Università di Bologna Outline Notification : Status Bar Notifications Notification : Toast Notifications Thread

More information

Android Internals and the Dalvik VM!

Android Internals and the Dalvik VM! Android Internals and the Dalvik VM! Adam Champion, Andy Pyles, Boxuan Gu! Derived in part from presentations by Patrick Brady, Dan Bornstein, and Dan Morrill from Google (http://source.android.com/documentation)!

More information

Another difference is that the kernel includes only the suspend to memory mechanism, and not the suspend to hard disk, which is used on PCs.

Another difference is that the kernel includes only the suspend to memory mechanism, and not the suspend to hard disk, which is used on PCs. 9. Android is an open-source operating system for mobile devices. Nowadays, it has more than 1.4 billion monthly active users (statistic from September 2015) and the largest share on the mobile device

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

Android Software Development Kit (Part I)

Android Software Development Kit (Part I) Android Software Development Kit (Part I) Gustavo Alberto Rovelo Ruiz October 29th, 2010 Look & Touch Group 2 Presentation index What is Android? Android History Stats Why Andriod? Android Architecture

More information

Mobile Application Development Android

Mobile Application Development Android Mobile Application Development Android Lecture 3 MTAT.03.262 Satish Srirama satish.srirama@ut.ee Android Lecture 2 - recap Views and Layouts Events Basic application components Activities Intents 9/15/2014

More information

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ]

Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ] s@lm@n Android Exam AND-401 Android Application Development Version: 7.0 [ Total Questions: 129 ] Android AND-401 : Practice Test Question No : 1 Which of the following is required to allow the Android

More information

Answers to Exercises

Answers to Exercises Answers to Exercises CHAPTER 1 ANSWERS 1. What is an AVD? Ans: An AVD is an Android Virtual Device. It represents an Android emulator, which emulates a particular configuration of an actual Android device.

More information

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

Android for Ubiquitous Computing Researchers. Andrew Rice University of Cambridge 17-Sep-2011 Android for Ubiquitous Computing Researchers Andrew Rice University of Cambridge 17-Sep-2011 Getting started Website for the tutorial: http://www.cl.cam.ac.uk/~acr31/ubicomp/ Contains links to downloads

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 NATIVE APP: INTRODUCTION TO ANDROID. Roberto Beraldi

ANDROID NATIVE APP: INTRODUCTION TO ANDROID. Roberto Beraldi ANDROID NATIVE APP: INTRODUCTION TO ANDROID Roberto Beraldi Role of an operating system APPLICATIONS OPERATING SYSTEM CPU MEMORY DEVICES Android = OS + Middleware Based on Linux Not just another distribution.

More information

Android Application Development Course Code: AND-401 Version 7 Duration: 05 days

Android Application Development Course Code: AND-401 Version 7 Duration: 05 days Let s Reach For Excellence! TAN DUC INFORMATION TECHNOLOGY SCHOOL JSC Address: 103 Pasteur, Dist.1, HCMC Tel: 08 38245819; 38239761 Email: traincert@tdt-tanduc.com Website: www.tdt-tanduc.com; www.tanducits.com

More information

Introduction. Lecture 1. Operating Systems Practical. 5 October 2016

Introduction. Lecture 1. Operating Systems Practical. 5 October 2016 Introduction Lecture 1 Operating Systems Practical 5 October 2016 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/.

More information

Midterm Examination. CSCE 4623 (Fall 2017) October 20, 2017

Midterm Examination. CSCE 4623 (Fall 2017) October 20, 2017 Midterm Examination CSCE 4623 (Fall 2017) Name: UA ID: October 20, 2017 Instructions: 1. You have 50 minutes to complete the exam. The exam is closed note and closed book. No material is allowed with you

More information

Android framework. How to use it and extend it

Android framework. How to use it and extend it Android framework How to use it and extend it Android has got in the past three years an explosive growth: it has reached in Q1 2011 the goal of 100M of Activations world wide with a number of daily activations

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

Syllabus- Java + Android. Java Fundamentals

Syllabus- Java + Android. Java Fundamentals Introducing the Java Technology Syllabus- Java + Android Java Fundamentals Key features of the technology and the advantages of using Java Using an Integrated Development Environment (IDE) Introducing

More information

Programming Mobile Applications with Android Lab2

Programming Mobile Applications with Android Lab2 Programming Mobile Applications Lab2 22-26 September, Albacete, Spain Jesus Martínez-Gómez .- Create, compile and execute an Android application to understand the Android life cycle Follow the instructions

More information

ANDROID DEVELOPMENT. Course Details

ANDROID DEVELOPMENT. Course Details ANDROID DEVELOPMENT Course Details centers@acadgild.com www.acadgild.com 90360 10796 01 Brief About the Course Android s share of the global smartphone is 81%. The Google Certified Android development

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

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY:

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY: PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY: K.VENU 10JE1A0555 Venu0555@gmail.com B.POTHURAJU 10JE1A0428 eswr10je1a0410@gmail.com ABSTRACT early prototypes, basic building blocks of an android

More information

Services Broadcast Receivers Permissions

Services Broadcast Receivers Permissions Services Broadcast Receivers Permissions Runs in the background Extends Service Java class Not necessarily connected to the user s visual interface Music player working in foreground User wants read email

More information

Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time

Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time The 1 activity 1 thing the user can do heuristic may not make sense for larger devices Application

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

Lecture 08. Android Permissions Demystified. Adrienne Porter Felt, Erika Chin, Steve Hanna, Dawn Song, David Wagner. Operating Systems Practical

Lecture 08. Android Permissions Demystified. Adrienne Porter Felt, Erika Chin, Steve Hanna, Dawn Song, David Wagner. Operating Systems Practical Lecture 08 Android Permissions Demystified Adrienne Porter Felt, Erika Chin, Steve Hanna, Dawn Song, David Wagner Operating Systems Practical 20 November, 2013 OSP Lecture 08, Android Permissions Demystified

More information

Mobile Application Development Android

Mobile Application Development Android Mobile Application Development Android Lecture 3 MTAT.03.262 Satish Srirama satish.srirama@ut.ee Android Lecture 2 -recap Views and Layouts Events Basic application components Activities Intents BroadcastReceivers

More information

ANDROID SYLLABUS. Advanced Android

ANDROID SYLLABUS. Advanced Android Advanced Android 1) Introduction To Mobile Apps I. Why we Need Mobile Apps II. Different Kinds of Mobile Apps III. Briefly about Android 2) Introduction Android I. History Behind Android Development II.

More information