Overview of Android 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.
Android OS : Core Concepts Dr. Jeyakesavan Veerasamy Sr. Lecturer University of Texas at Dallas
Application Fundamentals Android Development. Announcements Posting in D2L Tutorials.
Android architecture overview
Introduction to Android Mohammad A. Gowayyed CS334-Spring 2014.
Android 02: Activities David Meredith
Android activities 1 CS300. What makes an app?  Activities: presentation layer  Services: invisible workers  Content Providers: databases  Intents:
Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
Android 101 Application Fundamentals January 29, 2010.
Mobile Application Development
Google Android as a mobile development platform T Internet Technologies for Mobile Computing Olli Mäkinen.
Mobile Programming Pertemuan 6 Presented by Mulyono Poltek NSC Surabaya.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
@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.
Android Middleware Bo Pang
Chien-Chung Shen Manifest and Activity Chien-Chung Shen
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
Mobile Application Development with ANDROID. Agenda Mobile Application Development (MAD) Intro to Android platform Platform architecture Application building.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
CS5103 Software Engineering Lecture 08 Android Development II.
© 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.
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.
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.
CS378 - Mobile Computing Intents.
16 Services and Broadcast Receivers CSNB544 Mobile Application Development Thanks to Utexas Austin.
Android for Java Developers Denver Java Users Group Jan 11, Mike
10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Introduction to Android Overview of Android System Android Components Component.
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
User Interfaces: Part 1 (View Groups and Layouts).
ANDROID L. Grewe Components  Java Standard Development Kit (JDK) (download) (latest version)  AndroidStudio.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
DKU-MUST Mobile ICT Education Center 10. Activity and Intent.
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
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.
The Ingredients of Android Applications. A simple application in a process In a classical programming environment, the OS would load the program code.
Android Fundamentals. What is Android Software stack for mobile devices Software stack for mobile devices SDK provides tools and APIs to develop apps.
CS371m - Mobile Computing Intents 1. Allow us to use applications and components that are already part of Android System – start activities – start services.
Presented by: Saurabh Kumar Sinha (MRT07UGBIT 186) IT VII Semester, Shobhit University Meerut.
Introduction to Android Programming
Introduction to Android Chapter 1 1. Objectives Understand what Android is Learn the differences between Java and Android Java Examine the Android project.
The Basics of Android App Development Sankarshan Mridha Satadal Sengupta.
Android Application -Architecture.
Lecture 2: Android Concepts
Android 01: Fundamentals
Mobile Application Development BSCS-7 Lecture # 2
Android Application Development 1 6 May 2018
Lecture 2 Zablon Ochomo Android Programming Lecture 2 Zablon Ochomo
ANDROID AN OPEN HANDSET ALLIANCE PROJECT
Android Runtime – Dalvik VM
Android.
MAD.
Activities and Intents
Android Mobile Application Development
CMPE419 Mobile Application Development
Application Fundamentals
Application Development A Tutorial Driven Course
HNDIT2417 Mobile Application Development
Android Platform, Android App Basic Components
Emerging Platform#3 Android & Programming an App
Introduction to Android
Application Fundamentals
Lecture 2: Android Concepts
CMPE419 Mobile Application Development
Presentation transcript:

Overview of Android Application Development

Android Operating System Architecture ©SoftMoore Consulting

Android Applications Are written in the Java programming language. Each application must have a unique package name. Some core libraries are different. Are bundled into an archive file with the “.apk” suffix. vehicle for distributing applications and installing on mobile devices Run on the Dalvik Virtual Machine, a Java VM designed for systems that are processor/memory constrained. Google is working on a replacement for Dalvik called ART. See https://source.android.com/devices/tech/dalvik/art.html ©SoftMoore Consulting

Android Application Security By default, application code runs in isolation of other applications Every application runs in its own Linux process. Each process has its own virtual machine (VM). By default, each application is assigned a unique Linux user ID. Permissions are set so that the application’s files are visible only to that application. ©SoftMoore Consulting

Signing an Application The Android system requires that all installed applications be digitally signed with a certificate (a.k.a., key) whose private key is held by the application’s developer. The certificate does not need to be signed by a certificate authority – most Android applications use self-signed certificates. Android devices test a signer certificate’s expiration date only at install time. If the certificate expires after the application is installed, the application will continue to function normally. ©SoftMoore Consulting

The SDK Debug Key During installation, the Android SDK tools create a debug keystore and key in <ANDROID_SDK_HOME>\.android with predetermined names/passwords: Keystore name: “debug.keystore” Keystore password: “android” Key alias: “androiddebugkey” Key password: “android” At each compilation, SDK tools use this debug key to sign the .apk file. Caution: Applications signed with the debug certificate cannot be released to the public. ©SoftMoore Consulting

Application Components Every application is made up of one or more of the following four components: Activity – represents a single screen with a user interface. An application usually consists of one or more activities. most common component implemented as a subclass of class Activity Service – runs in the background and does not provide a user interface. example: music player implemented as a subclass of class Service ©SoftMoore Consulting

Application Components (continued) Broadcast Receiver – responds to system-wide broadcast announcements. Broadcast receivers do not display a user interface, but they may create a status bar notification or they may start an activity in response to the information they receive implemented as a subclass of class BroadcastReceiver Content Provider – manages a shared set of application data and makes it available to other applications; e.g., from a file or an SQLite database. example: contact information implemented as a subclass of class ContentProvider ©SoftMoore Consulting

Android Manifest Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest file presents essential information about the app to the Android system Among other things, the manifest does the following: names the Java package for the application. The package name serves as a unique identifier for the application. describes the components (activities, services, broadcast receivers, and content providers) that make up the application declares permissions the application must have in order to access protected parts of the API declares the minimum Android API level required by the application ©SoftMoore Consulting

Intents With the exception of content providers, each component is activated by an asynchronous message called an intent, an object of class Intent. An intent object holds the content of the message. For activities and services, it names the action being requested and specifies the URI of the data to act on, among other things. Intents provide a facility for performing late runtime binding between the code in different applications. Their most significant use is in the launching of activities. ©SoftMoore Consulting

Explicit Intents versus Implicit Intents There are two types of intents: Explicit intents request the launch of a specific activity by referencing the activity by class name. Explicit intents are typically used within a single application. Implicit intents declare a general action to be performed or provide data of a specific type on which the action is to be performed. For implicit intents, the Android runtime selects the activity to launch that most closely matches the criteria. When you create an explicit intent to start an activity or service, the system immediately starts the application component specified in the Intent object. When you create an implicit intent, the Android system finds the appropriate component to start. ©SoftMoore Consulting

The Android System Handles Implicit Intents ©SoftMoore Consulting

Information Contained in an Intent Component name: name of the component to start optional, but including it makes an intent explicit Action: string that specifies the generic action to perform e.g., ACTION_MAIN or ACTION_EDIT Data: URI of data to be acted on and/or the data MIME type different actions are paired with different kinds of data type of data supplied is generally dictated by the intent's action Category: string containing additional information about the kind of component that should handle the intent any number of category descriptions can be placed in an intent most intents do not require a category Extras: key-value pairs that carry additional information required to accomplish the requested action ©SoftMoore Consulting

Using Intents Three fundamental use cases for intents To start an activity To start a service To deliver a broadcast ©SoftMoore Consulting

Activities and Views One of the activities of an application is typically marked as the first one that should be presented to the user when the application is launched; i.e., the main activity. Each activity is given a default window to draw in. An activity can also make use of additional windows such as a pop-up dialog. The visual content of the window is provided by a hierarchy of views. Each view controls a particular rectangular space within the window. A view is an object of a subclass of class View. ©SoftMoore Consulting

Activities and Views (continued) Parent views contain and organize the layout of their children. Examples include WebView, LinearLayout, and TableLayout. Leaf views draw in the rectangles they control and respond to user actions directed at that space. Most leaf views are graphical widgets such as buttons, text fields, check boxes, etc. Android has a number of ready-made views that you can use – see packages android.view and android.widget. ©SoftMoore Consulting

States in the Lifetime of an Activity An activity has essentially three main states: Active (running): It is in the foreground of the screen (at the top of the activity stack for the current task). Paused: It has lost focus but is still visible to the user. That is, another activity lies on top of it and that activity either is transparent or doesn't cover the full screen, so some of the paused activity can show through. Stopped: It is completely obscured by another activity. It still retains all state information. However, it is no longer visible to the user, so its window is hidden and it will often be killed by the system when memory is needed elsewhere. ©SoftMoore Consulting

Activity Lifecycle and Lifecycle Methods (http://developer. android ©SoftMoore Consulting

Understanding the Activity Lifecycle The activity lifecycle is designed to protect battery life and manage system memory. Activities live on a stack; i.e., the Android framework manages a stack of activities. If an activity is paused or stopped and available memory is low, the system can drop it from memory either by asking it to finish (calling its finish() method), or simply killing its process. When it is displayed again to the user, it must be completely restarted and restored to its previous state. Android makes it easy to develop applications that are killed at any moment without losing state. ©SoftMoore Consulting

Developing in Android Studio ©SoftMoore Consulting

Android Virtual Device (emulator) ©SoftMoore Consulting

Relevant Links Android Application Fundamentals http://developer.android.com/guide/components/fundamentals.html Android Developer Videos – Androidology Part 1 of 3: Architecture Overview https://www.youtube.com/watch?v=QBGfUs9mQYY Part 2 of 3: Application Lifecycle https://www.youtube.com/watch?v=fL6gSd4ugSI Part 3 of 3: APIs https://www.youtube.com/watch?v=MPukbH6D-lY YouTube Android Developers Channel https://www.youtube.com/user/androiddevelopers Intents and Intent Filters http://developer.android.com/guide/components/intents-filters.html ©SoftMoore Consulting