Services are software components designed specifically to perform long background operations.
|
|
- Austin York
- 5 years ago
- Views:
Transcription
1 SERVICES
2 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 do not require a user interface. Services have a lifecycle that is separate from that of the component, such as an Activity, that starts them. This autonomy allows a service to continue running even after the starting component is no longer alive.
3 Service type Started Service Something to be done in the background. It doesn t provide a result (although it can send a broadcast or set a notification) Started with context.startservice(intent) onbind() must return null Bound Service Allows a client to set up a connection (bind) with the service so that methods can be called Started with context.bindservice(intent,serviceconnetcion,flags) onbind() returns an interface with methods that can be called
4 Service lifecycle
5 Starting the Service The service to be started is identified via an intent, provided as an argument of StartService(..) and bindservice(..) Explicit intent are recommended What about implicit intents? What happen if two services respond to the same action? The system selects one service at random (!) Given a higher priority can force the selection Priority is a field of the <intent-filter> tag
6 Service class java.lang.object android.content.context android.content.broadcastreceiver android.content.contextwrapper android.app.service android.content.contextthemewrapper android.app.intentservice android.app.activity
7 Intent service The IntentService class is a convenience class (subclassed from the Service class) that sets up a worker thread for handling background tasks and handles each request in an FIFO order. Once the service has handled all queued requests, it simply exits. All that is required when using the IntentService class is to implement onhandleintent(intent) method
8 Intent Service: example Main Activity Explicit Intent Intent Service The service needs to be registered in the manifest file The main activity creates an explicit intent pointing to the service The service is started and the onhandleintent method executed Intents are queued and served serially
9 Intent Service (demo)
10 Example Suppose we want to sync with a local content provider with a server, but only when an internet connection is available. This is one possible solution: Register a broadcast receiver to the following bcast intent: ConnectionManager.CONNECTIVITY_ACTION (When the connectivity changes this intent is fired) Check (from the receiver) if now the connection is now up If this is the case, then start an IntentService The IntentService will use a Socket to open a stream with the server Data are read from the content provider
11 Solution (sync) Socket Intent Service Start Broadcast Receiver ContentProvider ConnectivityManager.CONNECTIVITY_ACTION
12 Another example Check a condition every minute..(warning: registration must be dynamic, i.e. from inside an activity) Activity B Activity A register receiver Notification Manager Create a PendingIntent Intent Service Start Broadcast Receiver Time tick
13 Another example (do something periodically) Activity Activity Notification Manager Intent Service PendingIntent Create a pending intent Set a periodic alarm Alarm Manager
14 Another example (do something periodically). Solution 2 Activity Activity Notification Manager Intent Service Create a pending intent Set an alarm PendingIntent Create a p.i, Set an alarm Alarm Manager
15 Started service Started services are launched by other application components (such as an activity or even a broadcast receiver) and potentially run indefinitely in the background until the service is stopped, or is destroyed by the Android runtime system in order to free up resources. A service will continue to run if the application that started it is no longer in the foreground, and even in the event that the component that originally started the service is destroyed. By default, a service will run within the same main thread as the application process from which it was launched (referred to as a local service). It is important, therefore, that any CPU intensive tasks be performed in a new thread within the service
16 Started service Unless a service is specifically configured to be private (once again via a setting in the manifest file), that service can be started by other components on the same Android device. This is achieved using the Intent mechanism in the same way that one activity can launch another as outlined in preceding slides. Started services are launched via a call to the startservice() method, passing through as an argument an Intent object identifying the service to be started. When a started service has completed its tasks, it should stop itself via a call to stopself(). Alternatively, a running service may be stopped by another component via a call to the stopservice() method, passing through as an argument the matching Intent for the service to be stopped. Services are given a high priority by the Android system and are typically amongst the last to be terminated in order to free up resource
17 Example Let s suppose we want run music in background We can use the MediaPlayer class to play, for example, an.mp3 file stored in the raw directory The MediaPlayer has the create(context,id) method that creates an istance of the MediaPlayer (say player) for the specified resource id A simple application will have two buttons (start and stop) The start button will call the start method on the player The stop button will call the stop method on the player
18 Example Activity A This solution is wrong Why? oncreate: player=mediaplayer(ctx,r.raw.song) startbutton: player.start() startbutton: player.stop() Suppose the user kills the activity And then starts the activity again. If it clicks the start button a new instance of the song is started Even worst the stop buttons doesn t Stop the previous song
19 Solution with started service Main Thread Play thread Process Service UI Activity An application that runs a player to play a song The service is started from the Activity and then it spawns a thread
20 Solution with started service startservice(intent) onstartcommand( ) Activity is killed X Activity is created startservice(intent) onstartcommand( ) A simple flag avoids to call another instance of MediaPlayer stopservice(intent) ondestroy()
21 Design guides OnCreate Called one time when the service is first started. This is where initialization code should be implemented. OnStartCommand Called for each request to start the service, either as a result of a call to StartService or a restart by the system. The method returns a StartCommmandResult value that indicates how or if the system should handle restarting the service after a shutdown due to low memory. This call takes place on the main thread. OnDestroy Called after the service receives a StopSelf or StopService call. This is where service-wide cleanup can be performed.
22 StartCommmandResult code Sticky A sticky service will be restarted, and a null intent will be delivered to OnStartCommand at restart. Redeliver Intent The service is restarted, and the last intent that was delivered to OnStartCommand before the service was stopped by the system is redelivered. Not Sticky The service is not automatically restarted.
23 Foreground service By default services are background, meaning that if the system needs to kill them to reclaim more memory, they can be killed without too much harm. The method startforeground(id,notification) Makes a service run in the foreground state (meaning is less likely to be killed by the OS), supplying the ongoing notification to be shown to the user while in this state. For example in the background music playback, the user would notice if the music stopped playing. Application can also acquire a wake-lock (avoids the CPU to go in the idle state) and a wifi-lock (to avoid turning the radio off if streaming is done from internet)
24 Bound Service (concept) A bound service is similar to a started service with the exception that it permits interaction with the component that launched it. With a started service this could be partially achieved setting a specific key in the intent to indicate some action to be performed (like, start the song again) However, a bound service allows the launching component to interact with, and receive results from, the service. Through the implementation of interprocess communication (IPC), this interaction can also take place across process boundaries.
25 Bound Service (clients) A component starts and binds to a bound service via a call to the bindservice(intent,serviceconnection,flag) method Intent: identifies the service ServiceConnection is an interface with two callback methods (called when the connection to the service is established or lost) Operation options for the binding (may be 0). See documentation Multiple components may bind to a service simultaneously. A component unbinds the service calling unbindservice(serviceconnection) ServiceConnection is the same one used to bind When the last bound client unbinds from a service, the service will be terminated by the Android runtime system.
26 Bound Service (clients) A bound Service is not a correct solution for playing music in background. Why? Hint: same problem as for the first solution (activity) However, a bound service may also be started via call to startservice( ) Once started, components may then bind to it via bindservice(..) calls When a bound service is launched via a call to startservice(..) it will continue to run even after the last client unbinds from it
27 Bound Service (server) A bound service extends the Servive class It must include an implementation of the onbind() that returns an object that implements IBinder (which is an interface). The object must extend the Binder class (that implements IBinder) A bound service can be local (belonging to the same package and running in the same process) or remote. In the case of local service the implementation is easier For remote service interprocess communication requires proxy and skeleton, plus the aild tool (see official documentation).
28 Bound Service (local service) A service can be bounded to another SW component, meaning that it can invoke methods implemented by the service through a proxy (Binder) of the Service (which is seen as a remote object) ServiceConnection is an interface monitoring connections to a service ServiceConnection <<interface>> Activity 1. bindservice() 2. onbind() returns a reference through which calling methods Service
29 Remote services It is possible to access a service running in a different process IDL aidl tool generates proxy skelethon process A process B
30 Service vs Thread A service is a component that Android is aware of (it must be declared in the manifest), with its own lifecycle A service can be activated from other components (not true for threads) A service is destroyed by the system only under very heavy circumstances and re-created according to restart options A service is in a sense similar to a Unix s daemon, e.g, it can be used system-wide and started automatically after the device boot ends
31 Service process priority The system kills the process hosting a service if it is under heavy memory pressure. However, if this happens, the system will later try to restart the service (and a pending intent can be delivered again) A processes hosting service have higher priority than those running an activity
32 System Services Lots of useful services See documentation
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 informationAndroid 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 informationServices. 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 informationSoftware 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 informationCS378 -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 informationEMBEDDED 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 informationANDROID 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 informationAndroid. 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 informationMobile 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 informationServices. 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 informationLecture 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 informationAndroid 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 informationMobile 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 informationUnderstand 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 informationMobile 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 informationAndroid 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 informationMinds-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 informationServices. 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 informationApplication 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 informationAndroid 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 informationServices 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 informationProgramming 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 informationACTIVITY, 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 informationANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL II)
ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL II) Lecture 6: Notification and Web Services Notification A notification is a user interface element that you display outside your app's normal
More informationMobile 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/22/2017
More informationServices & Interprocess Communication (IPC) CS 282 Principles of Operating Systems II Systems Programming for Android
Services & Interprocess Communication (IPC) CS 282 Principles of Operating Systems II Systems Programming for Android A Service is an application component that can perform longrunning operations in the
More informationMobile 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 informationProgramming 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 information1. 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 informationServices. service: A background task used by an app.
CS 193A Services This document is copyright (C) Marty Stepp and Stanford Computer Science. Licensed under Creative Commons Attribution 2.5 License. All rights reserved. Services service: A background task
More informationSecurity 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 informationApp Development for Android. Prabhaker Matet
App Development for Android Prabhaker Matet Development Tools (Android) Java Java is the same. But, not all libs are included. Unused: Swing, AWT, SWT, lcdui Android Studio (includes Intellij IDEA) Android
More informationCS378 - 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 informationAndroid 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 informationImplementing a Download Background Service
1 Implementing a Download Background Service Android Services Stefan Tramm Patrick Bönzli Android Experience Day, FHNW 2008-12-03 2 Agenda Part I: Business Part the application some screenshots Part II:
More informationUnderstanding 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 informationGetting started: Installing IDE and SDK. Marco Ronchetti Università degli Studi di Trento
Getting started: Installing IDE and SDK Marco Ronchetti Università degli Studi di Trento Alternative: Android Studio http://developer.android.com/develop/index.html 2 Tools behind the scenes dx allows
More informationAndroid Services. Victor Matos Cleveland State University. Services
22 Android Victor Matos Cleveland State University Notes are based on: Android Developers http://developer.android.com/index.html 22. Android Android A Service is an application component that runs in
More informationios 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 informationCS378 -Mobile Computing. Audio
CS378 -Mobile Computing Audio Android Audio Use the MediaPlayer class Common Audio Formats supported: MP3, MIDI (.mid and others), Vorbis(.ogg), WAVE (.wav) and others Sources of audio local resources
More informationBroadcast receivers. Marco Ronchetti Università degli Studi di Trento
1 Broadcast receivers Marco Ronchetti Università degli Studi di Trento Bradcast receiver a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system for
More informationCS 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 informationAndroid Services & Local IPC: The Activator Pattern (Part 2)
: The Activator Pattern (Part 2) d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Professor of Computer Science Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee,
More informationLecture 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 informationSecurity model. Marco Ronchetti Università degli Studi di Trento
Security model Marco Ronchetti Università degli Studi di Trento Security model 2 Android OS is a multi-user Linux in which each application is a different user. By default, the system assigns each application
More informationIntroduction 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 informationCS 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 informationapplication 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 informationEfficient Android Threading
.... - J.', ' < '.. Efficient Android Threading Anders Göransson Beijing Cambridge Farnham Köln Sebastopol Tokyo O'REILLY Table of Contents Preface xi 1. Android Components and the Need for Multiprocessing
More informationProduced 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 informationLab 5 Periodic Task Scheduling
Lab 5 Periodic Task Scheduling Scheduling a periodic task in Android is difficult as it goes against the philosophy of keeping an application active only while the user is interacting with it. You are
More informationMC 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 informationMultiple Activities. Many apps have multiple activities
Intents Lecture 7 Multiple Activities Many apps have multiple activities An activity A can launch another activity B in response to an event The activity A can pass data to B The second activity B can
More informationandroid application development CONTENTS 1.1 INTRODUCTION TO O ANDROID OPERATING SYSTEM... TURES Understanding the Android Software Stack...
Contents android application development FOR m.tech (jntu - h) i semester - CSE, ii semester - WEB TECHNOLOGIES CONTENTS i UNIT - I [CH. H. - 1] ] [INTRODUCTION TO ANDROID OPERATING SYSTEM]... 1.1-1.32
More informationOperating Systems. Review ENCE 360
Operating Systems Review ENCE 360 High level Concepts What are three conceptual pieces fundamental to operating systems? High level Concepts What are three conceptual pieces fundamental to operating systems?
More informationANDROID 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 informationAndroid 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 informationANDROID 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 informationCOLLEGE 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 informationSMD149 - Operating Systems
SMD149 - Operating Systems Roland Parviainen November 3, 2005 1 / 45 Outline Overview 2 / 45 Process (tasks) are necessary for concurrency Instance of a program in execution Next invocation of the program
More informationACTIVITY, 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 informationTermite WiFi Direct API
Termite WiFi Direct API Developers Guide 2014/15 Nuno Santos 1. Objectives This document provides a brief description of the Termite WiFi Direct API. 2. Termite API Guide In order for an application to
More informationAndroid 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 informationNotifications and Services. Landon Cox March 28, 2017
Notifications and Services Landon Cox March 28, 2017 Networking so far Volley (retrieve quiz stored at URL) User starts app Check with server for new quiz Say you re building a messaging app How else might
More informationAndroid OA Android Application Engineer(R) Certifications Basic.
Android OA0-002 Android Application Engineer(R) Certifications Basic http://killexams.com/exam-detail/oa0-002 Answer: A QUESTION: 130 Which of these is the incorrect explanation of the Android SDK's Hierarchy
More informationApp Development for Smart Devices. Lec #7: Windows Azure
App Development for Smart Devices CS 495/595 - Fall 2011 Lec #7: Windows Azure Tamer Nadeem Dept. of Computer Science Objective Working in Background AsyncTask Cloud Computing Windows Azure Two Presentation
More informationProgramming Android UI. J. Serrat Software Design December 2017
Programming Android UI J. Serrat Software Design December 2017 Preliminaries : Goals Introduce basic programming Android concepts Examine code for some simple examples Limited to those relevant for the
More informationMidterm 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 informationAndroid 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 informationAndroid 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 informationCOSC 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 informationCHAPTER 3 - PROCESS CONCEPT
CHAPTER 3 - PROCESS CONCEPT 1 OBJECTIVES Introduce a process a program in execution basis of all computation Describe features of processes: scheduling, creation, termination, communication Explore interprocess
More information2017 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 informationCSCU9YH Development with Android
CSCU9YH Development with Android Computing Science and Mathematics University of Stirling 1 Android Context 3 Smartphone Market share Source: http://www.idc.com/promo/smartphone-market-share/os 4 Smartphone
More informationAndroid 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 informationEMBEDDED 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 informationProcesses Prof. James L. Frankel Harvard University. Version of 6:16 PM 10-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved.
Processes Prof. James L. Frankel Harvard University Version of 6:16 PM 10-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved. Process Model Each process consists of a sequential program
More informationLearning Outcomes. Processes and Threads. Major Requirements of an Operating System. Processes and Threads
Learning Outcomes Processes and Threads An understanding of fundamental concepts of processes and threads 1 2 Major Requirements of an Operating System Interleave the execution of several processes to
More informationProcesses, PCB, Context Switch
THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering EIE 272 CAOS Operating Systems Part II Processes, PCB, Context Switch Instructor Dr. M. Sakalli enmsaka@eie.polyu.edu.hk
More informationAnnouncements. Program #1. Reading. Due 2/15 at 5:00 pm. Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed)
Announcements Program #1 Due 2/15 at 5:00 pm Reading Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed) 1 Scheduling criteria Per processor, or system oriented CPU utilization
More informationCS Android. Vitaly Shmatikov
CS 5450 Android Vitaly Shmatikov Structure of Android Applications Applications include multiple components Activities: user interface Services: background processing Content providers: data storage Broadcast
More informationSyllabus- 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 informationImplementation of Processes
Implementation of Processes A processes information is stored in a process control block (PCB) The PCBs form a process table Sometimes the kernel stack for each process is in the PCB Sometimes some process
More information32. And this is an example on how to retrieve the messages received through NFC.
4. In Android applications the User Interface (UI) thread is the main thread. This thread is very important because it is responsible with displaying/drawing and updating UI elements and handling/dispatching
More informationAndroid Architecture and Binder. Dhinakaran Pandiyan Saketh Paranjape
Android Architecture and Binder Dhinakaran Pandiyan Saketh Paranjape Android Software stack Anatomy of an Android application Activity UI component typically corresponding of one screen Service Background
More informationLecture 1 - Introduction to Android
Lecture 1 - Introduction to Android 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 informationLifecycle-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 informationCMSC436: 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 informationUNDERSTANDING 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 information1 System & Activities
1 System & Activities Gerd Liefländer 23. April 2009 System Architecture Group 2009 Universität Karlsruhe (TU), System Architecture Group 1 Roadmap for Today & Next Week System Structure System Calls (Java)
More informationProcesses and Threads
Processes and Threads 1 Learning Outcomes An understanding of fundamental concepts of processes and threads 2 Major Requirements of an Operating System Interleave the execution of several processes to
More informationMODELS OF DISTRIBUTED SYSTEMS
Distributed Systems Fö 2/3-1 Distributed Systems Fö 2/3-2 MODELS OF DISTRIBUTED SYSTEMS Basic Elements 1. Architectural Models 2. Interaction Models Resources in a distributed system are shared between
More informationLecture 4: Memory Management & The Programming Interface
CS 422/522 Design & Implementation of Operating Systems Lecture 4: Memory Management & The Programming Interface Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken
More informationWhy using intents. Activity. Screen1 Screen 2
INTENTS Why using intents Screen1 Screen 2 Activity An activity may manage many layout file (screens) Intents, provides a way for an activity to start another activity (thus changing screen) Beside this
More informationCS 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 informationAndroid 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 informationChapter 4: Threads. Operating System Concepts 9 th Edition
Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples
More informationIntroduction 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 informationProcesses The Process Model. Chapter 2 Processes and Threads. Process Termination. Process States (1) Process Hierarchies
Chapter 2 Processes and Threads Processes The Process Model 2.1 Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling Multiprogramming of four programs Conceptual
More informationANDROID 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