Android Mobile Application Development

Slides:



Advertisements
Similar presentations
Android Application Development A Tutorial Driven Course.
Advertisements

Google Android Introduction to Mobile Computing. Android is part of the build a better phone process Open Handset Alliance produces Android Comprises.
Programming with Android: Activities
Application Fundamentals Android Development. Announcements Posting in D2L Tutorials.
CSE2102 Introduction to Software Engineering Lab 2 Sept/4/2013.
Android 02: Activities David Meredith
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
The Android Activity Lifecycle. Slide 2 Introduction Working with the Android logging system Rotation and multiple layouts Understanding the Android activity.
1 CSCE 4013: Mobile Systems Programming Nilanjan Banerjee Mobile Systems Programming University of Arkansas Fayetteville, AR
Android Life Cycle CS328 Dick Steflik. Life Cycle The steps that an application goes through from starting to finishing Slightly different than normal.
@2011 Mihail L. Sichitiu1 Android Introduction Application Fundamentals.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Java RMI Project and Android Architecture
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Content Providers & Services.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
Software Architecture of Android Yaodong Bi, Ph.D. Department of Computing Sciences University of Scranton.
Android Mobile computing for the rest of us.* *Prepare to be sued by Apple.
01. Introduction to Android Prof. Oum Saokosal Master of Engineering in Information Systems, South Korea
Rajab Davudov. Agenda Eclipse, ADT and Android SDK APK file Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent Hello World.
COMP 365 Android Development.  Perform operations in the background  Services do not have a user interface (UI)  Can run without appearing on screen.
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
Mobile Application Development using Android Lecture 2.
16 Services and Broadcast Receivers CSNB544 Mobile Application Development Thanks to Utexas Austin.
10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Introduction to Android Overview of Android System Android Components Component.
Overview of Android Application Development
COMP 365 Android Development.  Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical.
ANDROID L. Grewe Components  Java Standard Development Kit (JDK) (download) (latest version)  AndroidStudio.
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.
1 CMSC 628: Introduction to Mobile Computing Nilanjan Banerjee Introduction to Mobile Computing University of Maryland Baltimore County
DKU-MUST Mobile ICT Education Center 10. Activity and Intent.
Activities Димитър Н. Димитров Astea Solutions AD.
Services Background operating component without a visual interface Running in the background indefinitely Differently from Activity, Service in Android.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Android Programming Steve Ko Computer Sciences and Engineering University at Buffalo.
Technische Universität München Services, IPC and RPC Gökhan Yilmaz, Benedikt Brück.
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.
Introduction to Android Programming
Android Mobile Application Development
Android Mobile Application Development
Android Application -Architecture.
Android Mobile Application Development
CS371m - Mobile Computing Services and Broadcast Receivers
Basic Activities and Intents
Lecture 2 Zablon Ochomo Android Programming Lecture 2 Zablon Ochomo
Reactive Android Development
Instructor: Mazhar Hussain
Activities, Fragments, and Events
Mobile Application Development BSCS-7 Lecture # 6
MAD.
Activities and Intents
Software Engineering in Mobile Computing
The Android Activity Lifecycle
Android Application Development android.cs.uchicago.edu
Android training in Chandigarh. What is ADB ADB stands for Android Debug Bridge. It is a command line tool that is used to communicate with the emulator.
Android Programming Lecture 9
CIS 470 Mobile App Development
Activity Lifecycle Fall 2012 CS2302: Programming Principles.
Application Development A Tutorial Driven Course
HNDIT2417 Mobile Application Development
Programming Mobile Applications with Android
CIS 470 Mobile App Development
Activity Lifecycle.
Emerging Platform#3 Android & Programming an App
Mobile Programming Dr. Mohsin Ali Memon.
Android Development Tools
Activities, Fragments, and Intents
CIS 470 Mobile App Development
CIS 694/EEC 693 Android Sensor Programming
Presentation transcript:

Android Mobile Application Development Android Application Components Lecture Three Assistant Lecturer Mustafa Ghanem Saeed Computer science Department Collage Of Science Cihan University - Sulaimaniyah

Application Components Application components are the essential building blocks of an Android application. These components are loosely coupled by the application manifest file AndroidManifest.xml that describes each component of the application and how they interact.

What are the main components of Android? Description Activities They dictate the UI and handle the user interaction to the smart phone screen Services They handle background processing associated with an application. Broadcast Receivers They handle communication between Android OS and applications. Content Providers They handle data and database management issues. http://www.tutorialspoint.com/android/android_application_components.htm

Activities This is the main component which user sees, when they run the Application. Activity are responsible for GUI (Graphical User Interface) to user.e.g., Phone dialer is Activity. An activity is implemented as a subclass of Activity class as follows −

Service 1 Service: This component is responsible for running long background operations or processes. There is no GUI for service, e.g., Running music is a Service. A service is implemented as a subclass of Service class as follows :

Service 2 A service can essentially take two states − State Description Started A service is started when an application component, such as an activity, starts it by calling startService(). Once started, a service can run in the background indefinitely, even if the component that started it is destroyed. Bound A service is bound when an application component binds to it by calling bindService(). A bound service offers a client-server interface that allows components to interact with the service, send requests, get results, and even do so across processes with interprocess communication (IPC).

Broadcast Receiver Broadcast Receiver: This is responsible for events – that listen for or respond to the events. Events are represented by intent class. These intents are then routed to broadcast receiver. E.g SMS message is a broadcast receiver. For sending the message there is one broadcast receiver and for receiving message there is another broadcast receiver. A broadcast receiver is implemented as a subclass of BroadcastReceiver class and each message is broadcaster as an Intent object.

Content Provider Content Provider: This  component allows multiple applications to store and share data. This is similar to our database style interface although it is responsible for interprocess communications between the Apps. E.g., Email app uses content providers for viewing inbox mails. A content provider is implemented as a subclass of ContentProvider class and must implement a standard set of APIs that enable other applications to perform transactions.

Additional Components There are additional components which will be used in the construction of above mentioned entities, their logic, and wiring between them. These components are −

Android Activity Lifecycle An activity is the single screen in android. It is like window or frame of Java. Android Activity Lifecycle is controlled by 7 methods of android.app.Activity class. The android Activity is the subclass of ContextThemeWrapper class. By the help of activity, you can place all your UI components or widgets in a single screen. http://www.javatpoint.com/android-life-cycle-of-activity

Activity Lifecycle the 7 lifecycle methods of android activity (Question). Method Description onCreate called when activity is first created. onStart called when activity is becoming visible to the user. onResume called when activity will start interacting with the user. onPause called when activity is not visible to the user. onStop called when activity is no longer visible to the user. onRestart called after your activity is stopped, prior to start. onDestroy called before the activity is destroyed.

Activity Lifecycle Diagram (Question).

Activity Lifecycle (Two activities)

Conditions of activity lifecycle Question: List all lifecycle methods of android activity when (called when the activity creates, visible to users, called when the activity in background, called when the activity finish, called when the activity again comes in foreground)

Important Questions? Define Application Components? Ans : Slide 2 What are the main Application components of Android? Ans : Slide 3 Explain Activities in Android Application Components and write sample java code to implement it ? Ans : Slide 4 Explain Service in Android Application Components and write sample java code to implement it ? Ans : Slide 5 Explain Broadcast Receiver in Android Application Components and write sample java code to implement it ? Ans : Slide 7 Explain Content Provider in Android Application Components and write sample java code to implement it ? Ans : Slide 8 A Android Application service can essentially take two state, explain that? Ans : Slide 6 What are the additional Application components of Android? Ans : Slide 9 List lifecycle methods of android activity with short Description? Ans : Slide 11 Drew Activity Lifecycle Diagram? Ans : Slide 12 List only the methods of lifecycle of android activity when: Ans : Slide 14 called when the activity creates, visible to users? called when the activity in background? called when the activity finish? called when the activity again comes in foreground?

Questions? Discussion?