Android 101 Application Fundamentals January 29, 2010.

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
Joemarie Comeros Amparo Android Development Orientation for Starters.
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.
App Development on Android
Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
Android Life Cycle CS328 Dick Steflik. Life Cycle The steps that an application goes through from starting to finishing Slightly different than normal.
Mobile Application Development
Basic, Basic, Basic Android. What are Packages? Page 346 in text Package statement goes before any import statements Indicates that the class declared.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Android Application Development with Java UPenn CS4HS 2011 Chris Murphy
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
@2011 Mihail L. Sichitiu1 Android Introduction Application Fundamentals.
Android Security Enforcement and Refinement. Android Applications --- Example Example of location-sensitive social networking application for mobile phones.
Getting Started with Android Development Rohit Ghatol.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Chien-Chung Shen Manifest and Activity Chien-Chung Shen
Understanding Android Security Yinshu Wu William Enck, Machigar Ongtang, and PatrickMcDaniel Pennsylvania State University.
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Software Architecture of Android Yaodong Bi, Ph.D. Department of Computing Sciences University of Scranton.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Chapter 2: Simplify! The Android User Interface
1 Programming in Android. 2 Outline 3 What you get from Android An Android Application is a Loosely-Coupled Software System The Project Structure The.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
Presentation Seminar on “IMAGE SLIDER –AN ANDROID APPLICATION”
Rajab Davudov. Agenda Eclipse, ADT and Android SDK APK file Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent Hello World.
Mobile Application Development using Android Lecture 2.
DUE Hello World on the Android Platform.
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
Copyright© Jeffrey Jongko, Ateneo de Manila University Of Activities, Intents and Applications.
10/10/2015 E.R.Edwards 10/10/2015 Staffordshire University School of Computing Introduction to Android Overview of Android System Android Components Component.
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
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 Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 2: Simplify! The Android User Interface.
Creating an Example Android App in Android Studio Activity lifecycle & UI Resources.
ANDROID L. Grewe Components  Java Standard Development Kit (JDK) (download) (latest version)  AndroidStudio.
Android Security Model that Provide a Base Operating System Presented: Hayder Abdulhameed.
Android System Security Xinming Ou. Android System Basics An open-source operating system for mobile devices (AOSP, led by Google) – Consists of a base.
Applications with Multiple Activities. Most applications will have more than one activity. The main activity is started when the application is started.
ANDROID APPLICATION DEVELOPMENT. ANDROID DEVELOPMENT DEVELOPER.ANDROID.COM/INDEX.HTML THE OFFICIAL SITE FOR ANDROID DEVELOPERS. PROVIDES THE ANDROID SDK.
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.
Introduction to Android Chapter 1 1. Objectives Understand what Android is Learn the differences between Java and Android Java Examine the Android project.
Android Application -Architecture.
Mobile Applications (Android Programming)
Lecture 2: Android Concepts
Android 01: Fundamentals
Android Application Development 1 6 May 2018
Understanding Android Security
Reactive Android Development
ANDROID AN OPEN HANDSET ALLIANCE PROJECT
Android Runtime – Dalvik VM
MAD.
Mobile Device Development
Android Programming Lecture 9
Android Programming Lecture 5
Application Fundamentals
Understanding Android Security
Emerging Platform#3 Android & Programming an App
Introduction to Android
Mobile Programming Broadcast Receivers.
Presentation transcript:

Android 101 Application Fundamentals January 29, 2010

In this presentation What is Android Application Components Intents The manifest file Activities and Tasks

What is Android? Developed by Google Software stack for mobile devices that includes an operating system, middleware and key applications. Open Source (but not too open) Reuse and Replacement of components Linux Kernel (version 2.6)

Android Layer Cake

Activities Presents a visual user interface for one focused endeavor the user can undertake. List of menu items a user can choose from or display photographs along with their captions Services Doesn’t have a visual user interface, instead runs in the background Play background music as the user attends to other matters Broadcast Receivers Receives and reacts to broadcast announcements An application can announce to “whoever is listening” that a picture was taken. Content Providers Makes a specific set of the application’s data available to other applications. An application uses a contact list component Intents A simple message passing framework. Using intents you can broadcast messages system-wide or to a target Activity or Service.

The Android Activity

Activities and Tasks Dan Morrill’s definition: –An Activity is a “molecule”: a discrete chunk of functionality –A task is a collection of Activities –A “process” is a standard Linux process

Activities (continue)

Activities vs Tasks (Apps) A concrete class in the API An encapsulation of a particular operation They run in the process of the.APK which installed them Optionally associated with a window (UI) An execution Context More of a notion than a concrete API entity A collection of related Activities Capable of spanning multiple processes Associated with their own UI history stack What users on other platforms know as “applications”

Process Basics How does it all of this relate to the Unix roots of Android? –Android process == Linux process (w/ its own unique UID) –By default, 1 process per APK –By default, 1 thread per process –Most components interleave events into the main thread

foreground visible Entire lifetime

Intents (The Basics)

So, what can you Intent to do? Intents are system messages that notify applications of various events: – Activity events ( launch app, press button) –Hardware state changes (acceleration change, screen off, etc) –Incoming data (Receiving call, SMS arrived) You can also create your own to launch applications, etc. –Inter-activity communications (open an app when you get to a location, etc)

Intent most basic example… public class NowRedux extends Activity implements View.OnClickListener { Button public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); btn=(Button)findViewById(R.id.button); btn.setOnClickListener(this); updateTime(); } public void onClick(View view) { updateTime(); } private void updateTime() { btn.setText(new Date().toString()); }

The Application’s Manifest

The manifest Declares the permissions the application will need (uses-permission) Declare permissions that activities or services might require to use your app (permission) Provides instrumentations elements (instrumentation) Defines the guts of the application Provides hooks to connect to optional Android components such as mapping (uses-library)

Default AndroidManifest.xml One application node. Application properties include icon and application label in home screen. One Activity node. Activity name is abbreviated to.Sample. Tells Android which Java class to load. The activity label is the title for that activity in the titlebar. Intent-filter tags specify which Intents launch the Activity. In order for an application to be available from the launcher it must include an Intent Filter listening for the MAIN action and the LAUNCHER category. <manifest xmlns:android- package=“com.motorola.Sample”> <activity android:name=".Sample"

Android Manifest (cont) <manifest xmlns:android- package=“com.mydomain.myapp”> <application <receiver android:enabled=“true” android:label=“My Broadcast Receiver” android:name=“.MyBroadcastReceiver”>

Android Manifest (cont) <manifest xmlns:android=" package="com.bikerolas" android:versionCode="30" android:versionName="1.2"> <activity android:name=".Fling"

Q&A

Citation This presentation contains references from the following sources: –The Busy Coder’s Guide to Android Development ( by Mark L. Murphy) –Inside the Android Application Framework (by Dan Morrill) android-application-frameworkhttp://sites.google.com/site/io/inside-the- android-application-framework –Dalvik VM Internal (by Dan Bornstein)