Services 1 CS440. What is a Service?  Component that runs on background  Context.startService(), asks the system to schedule work for the service, to.

Slides:



Advertisements
Similar presentations
Services. Application component No user interface Two main uses Performing background processing Supporting remote method execution.
Advertisements

Review Orders / Order Management Order Entry Lesson Four.
SAM 2007 v3.0 The Student Experience Including SAM Projects and Course Assess assignments.
Cosc 5/4730 Android Services. What is a service? From android developer web pages: Most confusion about the Service class actually revolves around what.
Chapter 6: Jam! Implementing Audio in Android Apps.
CPT 123 Internet Skills Class Notes Internet Services Session A.
Lec 06 AsyncTask Local Services IntentService Broadcast Receivers.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Cosc 4755 Phone programming: GUI Concepts & Threads.
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 1 Let’s get started. Let’s start by selecting an architecture from among.
Mobile Programming Pertemuan 6 Presented by Mulyono Poltek NSC Surabaya.
Fundamentals of Python: From First Programs Through Data Structures
Welcome! You can use this small app to easily find solutions to problems and download and run troubleshooters. To run a troubleshooter, simply click ‘Run.
FileSecure Implementation Training Patch Management Version 1.1.
Chien-Chung Shen Manifest and Activity Chien-Chung Shen
Softsmith Online Training Academy (SOTA) Welcome to Softsmith Learning Community We provide an enjoyable learning experience to our audience Visit us at.
Networking Nasrullah. Input stream Most clients will use input streams that read data from the file system (FileInputStream), the network (getInputStream()/getInputStream()),
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Concurrency in Android with.
Software Architecture of Android Yaodong Bi, Ph.D. Department of Computing Sciences University of Scranton.
ANDROID SERVICES Peter Liu School of ICT, Seneca College.
Using Skype. Overview What is it? –Skype is a software based VOIP application and network. What is VOIP? –VOIP = Voice Over Internet Protocol.
Rajab Davudov. Agenda Eclipse, ADT and Android SDK APK file Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent Hello World.
Cosc 5/4730 Broadcast Receiver. Broadcast receiver A broadcast receiver (short receiver) – is an Android component which allows you to register for system.
COMP 365 Android Development.  Perform operations in the background  Services do not have a user interface (UI)  Can run without appearing on screen.
Mobile Application Development using Android Lecture 2.
CS378 - Mobile Computing Intents.
16 Services and Broadcast Receivers CSNB544 Mobile Application Development Thanks to Utexas Austin.
SpotOn Game App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
COMP 365 Android Development.  Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical.
Java Threads. What is a Thread? A thread can be loosely defined as a separate stream of execution that takes place simultaneously with and independently.
1 Chapter 2.1 : Processes Process concept Process concept Process scheduling Process scheduling Interprocess communication Interprocess communication Threads.
Program that runs in appletviewer (test utility for applets) Web browser (IE, Communicator) Executes when HTML (Hypertext Markup Language) document containing.
ANDROID L. Grewe Components  Java Standard Development Kit (JDK) (download) (latest version)  AndroidStudio.
Working in the Background Radan Ganchev Astea Solutions.
Services A Service is an application component that can perform long-running operations in the background and does not provide a user interface. An application.
RURadfordUniversity Simple Extended Desktop Use Function-F7 to bring up the following menu, then select one of the following schemes depending on where.
1 CS161 Introduction to Computer Science Topic #9.
1 Mezzanine Ware (Pty) Ltd © 2014 Installing\Uninstalling the Mezzanine Helium Android application.
1 CMSC 628: Introduction to Mobile Computing Nilanjan Banerjee Introduction to Mobile Computing University of Maryland Baltimore County
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 What we'll cover here l Using the debugger: Starting the debugger Setting.
Services Background operating component without a visual interface Running in the background indefinitely Differently from Activity, Service in Android.
CHAPTER Agenda Applets Servelets Browsers HelloWorld.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Android Programming Steve Ko Computer Sciences and Engineering University at Buffalo.
Dextrosoft SCHEDULED PHONE BACKUP Backup your mobile life Version Copyright © 2015 Dextrosoft Private Limited. All Rights Reserved.
Technische Universität München Services, IPC and RPC Gökhan Yilmaz, Benedikt Brück.
Android intro Building UI #1: interactions. AndroidManifest.xml permissions 2.
CHAPTER 6 Threads, Handlers, and Programmatic Movement.
Services. What is a Service? A Service is not a separate process. A Service is not a thread. A Service itself is actually very simple, providing two main.
The Ingredients of Android Applications. A simple application in a process In a classical programming environment, the OS would load the program code.
3 Important Performance tracking tools in an Android Application Development Workflow Here are 3 tools every Android application developer should familiarize.
Developing Android Services. Objectives Creating a service that runs in background Performing long-running tasks in a separate thread Performing repeated.
Servlets.
Reactive Android Development
Reactive Android Development
Lecture 7: Android Services
Lab11 – MobileUIFrontEnd-BluemixBackend
CS240: Advanced Programming Concepts
Reactive Android Development
Android Application Development android.cs.uchicago.edu
Developing Android Services
Android Topics UI Thread and Limited processing resources
CS323 Android Topics Network Basics for an Android App
Android Topics Asynchronous Callsbacks
Android Topics Threads and the MessageQueue
CIS 470 Mobile App Development
Android Development Tools
APPLET PROGRAMMING.
Presentation transcript:

Services 1 CS440

What is a Service?  Component that runs on background  Context.startService(), asks the system to schedule work for the service, to be run until the service or someone else explicitly stop itContext.startService()  Facility for application to expose to other apps  Context.bindService(), allows a long-standing connection to be made to the service in order to interact with it. Context.bindService()  Not a separate process  Not a thread CS440 2

IntentService  Used to perform a certain task in the background  Once done it terminates itself automatically  Example: download a certain resources from the Internet. CS440 3

IBinder  Used by the activity to communicate with the Service. CS440 4

Create a simple local service  Start a new android project named SimpleService  Create a service class that extends android.app.Service.  This service just displays a message when started and again displays a message when stopped. Hence theonStart() and onDestroy() methods are implemented Use Toast with a long message display to display messages CS440 5

Create a simple local service  An entry for this service needs to be made in the AndroidManifest.xml file: CS440 6

Create a simple local service  We need to be able to invoke this service, i.e., start the service and stop the service.  Write an activity that can start and stop the service. This activity is called SimpleServiceActivity  It can have a button to start the service  It can also have a button to end the service  Do not forget the OnClickListeners!!! CS440 7

References  article.html article.html CS440 8