10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Introduction to Android Overview of Android System Android Components Component.

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.
Application Fundamentals Android Development. Announcements Posting in D2L Tutorials.
What is Android?.
Android architecture overview
Introduction to Android Mohammad A. Gowayyed CS334-Spring 2014.
Android Aims to bring Internet-style innovation and openness to mobile phones.
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.
Android activities 1 CS300. What makes an app?  Activities: presentation layer  Services: invisible workers  Content Providers: databases  Intents:
DEPARTMENT OF COMPUTER ENGINEERING
ANDROID OPERATING SYSTEM Guided By,Presented By, Ajay B.N Somashekar B.T Asst Professor MTech 2 nd Sem (CE)Dept of CS & E.
1 CSCE 4013: Mobile Systems Programming Nilanjan Banerjee Mobile Systems Programming University of Arkansas Fayetteville, AR
Android Application Development. Agenda  Android Business Model  Why Android  Android application market space  Market Segments & Target customers.
Mobile Application Development
Google Android as a mobile development platform T Internet Technologies for Mobile Computing Olli Mäkinen.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
@2011 Mihail L. Sichitiu1 Android Introduction Application Fundamentals.
To be Presented by, T.Sathishkumar [11mw07] 1. Synopsis Introduction Version Features License An Application Development Demo Possibilities Advantages.
Getting Started with Android Development Rohit Ghatol.
Android Application Development CSE 5520/4520 Wireless Networks.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
Android Info mostly based on Pro Android 3.  User Applications  Java Libraries – most of Java standard edition ◦ Activities/Services ◦ UI/Graphics/View.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
01. Introduction to Android Prof. Oum Saokosal Master of Engineering in Information Systems, South Korea
Presentation Seminar on “IMAGE SLIDER –AN ANDROID APPLICATION”
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.
DUE Hello World on the Android Platform.
16 Services and Broadcast Receivers CSNB544 Mobile Application Development Thanks to Utexas Austin.
Android for Java Developers Denver Java Users Group Jan 11, Mike
ANDROID 응용 프로그래밍 과정 – 목차 - 안드로이드란 - 안드로이드가 만들어지게 된배경 - 안드로이드의 철학 - 안드로이드 환경설정 ( SDK download, eclipse plug-in 설정, 간단한 프로그램 실행 ) - 안드로이드 동작원리 - 안드로이드 핵심.
Android Husam Abdel Rahman. Introduction Android Operating system is most popular operating system these days with the advance in voice communications.
Overview of Android Application Development
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
ANDROID L. Grewe Components  Java Standard Development Kit (JDK) (download) (latest version)  AndroidStudio.
Created By. Jainik B Patel Prashant A Goswami Gujarat Vidyapith Computer Department Ahmedabad.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
Mobile Development. Name: Saurabh Software Developer.
Services Background operating component without a visual interface Running in the background indefinitely Differently from Activity, Service in Android.
Lecture 2: Android Concepts
1 Android Workshop Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
Android Development For Beginners. What is Android? Android is an open mobile phone platform that was developed by Google and later by Open Handset Alliance.
Android operating system N. Sravani M. Tech(CSE) (09251D5804)
Introduction to Android Programming
The Basics of Android App Development Sankarshan Mridha Satadal Sengupta.
Android Application -Architecture.
Android 01: Fundamentals
Lecture 2 Zablon Ochomo Android Programming Lecture 2 Zablon Ochomo
Lecture 7: Service Topics: Services, Playing Media.
ANDROID AN OPEN HANDSET ALLIANCE PROJECT
Activities and Intents
Android Mobile Application Development
Software Engineering in Mobile Computing
The Android Activity Lifecycle
CMPE419 Mobile Application Development
Application Fundamentals
Application Development A Tutorial Driven Course
Korea Software HRD Center
Emerging Platform#3 Android & Programming an App
Lecture 7: Service Topics: Services, Broadcast Receiver, Playing Media.
Application Fundamentals
CMPE419 Mobile Application Development
Android Development Tools
Presentation transcript:

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Introduction to Android Overview of Android System Android Components Component lifecycles Slides rely heavily on

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Android Introduction F Android OS is based the Linux Kernel F Aimed at small-scale devices –Phones, tablets, TVs, games consoles… –Touch screen or mouse/pointer –Small internal memory (256Mbyte to 3GB) –Usually low power devices F Access to multiple sensors –Accelerometers (up down etc) –Proximity, Light, Magnetic –Geo location (GPS etc) F Resources defined in XML documents rather than inside code

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Android OS Features F Application framework enabling reuse and replacement of components F Dalvik virtual machine optimized for mobile devices F Integrated browser based on the open source WebKit engineWebKit F Optimized graphics powered by a custom 2D graphics library; 3D graphics based on (at least) OpenGL ES 1.0 specification, hardware acceleration optional but common F SQLite for structured data storage F Media support for common audio, video, and still image formats F Telephony, Bluetooth and WiFi (hardware dependent) F Camera, GPS, compass, and accelerometer (hardware dependent) F Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE

Android OS Structure

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Android Application Components F Components –Activities – most important for us –Services, “Broadcast Receivers”, “Content Providers” F “Intents” are used to activate components –Can use existing apps within your app, very easy to do F Intent Filters define what a component can do F The Manifest file is where most app capabilities are declared

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Activity F A visual user interface for one action ( Activity base class ) Activity –Eg a Text messaging app might have activities to show list of contacts write message review old messages change settings –They work together but each is independent F One of the activities in identified as the first to be launched. F Moving from one activity to another is accomplished by the current activity starting the next one. F Each activity has a default window to draw in.

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Views F Content of a window is a hierarchy of views (View Class ).View F Each view controls a rectangular space within the window. F Parent view contain children views. F Ready made views to use include:- –Buttons –Text Fields –Scroll bars –Menu items –Check boxes etc F Build in the GUI designer! A contains B ContainsC Contains D detail E detail Fdetail G detail H detail K detail I detail J detail LM

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Services F A service does not have a visual user interface F Runs in the background for an indefinite period –Eg service might play background music as user does something else. –Might fetch data over the network –Calculate something –Provide a result to an activity F Each service extends the Service base class Service F Services run in the main thread of the application process. –Don’t block other components or user interface –Often spawn another thread for time consuming tasks

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Broadcast Receivers F A component that does nothing but receive and react to broadcast announcements. F Many broadcasts originate in system code –Eg timezone change announcement –Battery low announcement –Picture has been taken announcement F Applications can initiate broadcasts –Data has been downloaded and ready to use F An application can have any number of broadcast receivers F Receivers extend the BroadcastReceiver base class. BroadcastReceiver F Notifications are often used by them.

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Content Providers F A content provider makes a specific set of the application’s data to another application.content provider F The data can be stored –in the file system –In an SQLite databaseSQLite –Some other manner that makes sense. F The content provider extends the ContentProvider base class.ContentProvider F Applications use a ContentResolver object to get at a content provider.ContentResolver

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Intents F Intents are asynchronous messages that activate Intents – activities, services and broadcast receivers. F For activities and services it –Names the action being requested –Specifies the URI of the data to act on Allow user to edit some specific text F Each type of component is activated by sending an intent object to –Activity - Context.startActivity() or Activity.startActivityForResult()- Context.startActivity()Activity.startActivityForResult() Android calls the activity’s onNewIntent() method and passes it the intent objectonNewIntent() –Service – Context.startService()Context.startService() Android calls the services OnStart() method and passes it the intent objectOnStart() –Broadcast Receiver – Context.sendBroadcast()Context.sendBroadcast() Android delivers the intent to all interested broadcast receivers by calling their Onreceive() method. Onreceive()

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing The Manifest File F Applications declare their components in a manifest file bundled in the Android package.apk F The manifest is an XML file. F It also –Names any libraries needed to run app –Identify any permissions the app needs –Declares intent filters (what can the app do)

Example Manifest document F...

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Activity Lifecycle F An activity has three states – Active or running when in the foreground ie has the focus for the user’s actions – Paused if it has lost focus but is still visible A paused activity is completely alive Can be killed by the system in extreme low memory situations – Stopped if completely obscured by another activity. It still retains all state and member information Often killed by the system when memory needed elsewhere F As activity state changes various methods called:- –onCreate(), onStart(), –onRestart(), onResume(), –onPause(), onStop(), –onDestroy()

Activity Starts Process is killed Activity is running Activity is no longer visible Activity is shut down OnCreate() OnResume() OnDestroy() OnStop() OnStart() OnPause() Another Activity in front Activity comes to the Foreground User navigates back to the activity Other Applications need memory OnRestart() Activity Lifecycle

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Service and Broadcast Receiver Lifecycle F A service –can be started or stopped Methods available –onCreate() –onStart() –onDestroy() If the service permits others to bind it additional methods are –onBind() –onUnbind() –onRebind() F A Broadcast receiver has on one callback method –onReceive()

Service is started by startService() Service is running Service is shut down OnCreate() OnDestroy() OnStart() The dervice is stopped (no callback) Service Lifecycle Service is started by bindService() Service is shut down OnCreate() OnDestroy() OnBind() Client interacts with the service OnUnbind() OnRebind()

10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Summary F Android is open source – anyone can join in! F Fairly radical change in perspective making programming interesting! F Apps can use other apps as content providers F Very powerful emulator to develop on, integrated with Eclipse IDE or Android Studio. F MIT has the AppInventor2 site – interesting way to get started F Battle for dominance between iPhone and Android ? –Anybody else in the running?