Application Fundamentals

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 Overview. Android (Google) is a widely anticipated open source operating system for mobile devices, Supporting Bluetooth ( wireless for short.
Android Application Model (3)
Android 02: Activities David Meredith
Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
User Interface Android Applications. Activities An activity presents a visual user interface. Each activity is given a default window to draw in. The.
Android 101 Application Fundamentals January 29, 2010.
Mobile Programming Pertemuan 6 Presented by Mulyono Poltek NSC Surabaya.
By: Jeremy Smith.  Introduction  Droid Draw  Add XML file  Layouts  LinearLayout  RelativeLayout  Objects  Notifications  Toast  Status Bar.
Intent An Intent describes the operation to be performed. Intents are used to start an activity using either of the following methods – Context.startActivity()
@2011 Mihail L. Sichitiu1 Android Introduction Application Fundamentals.
Android Overview Android (Google) is a widely anticipated open source operating system for mobile devices, Supporting Bluetooth ( wireless for short distance)
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
Android and Eclipse Thaddeus Diamond CPSC 112. A Quick Introduction Eclipse is an IDE (Integrated Development Environment Open Source Much more full-featured.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Introduction to Android Programming (CS5248 Fall 2015) Aditya Kulkarni August 26, 2015 *Based on slides from Paresh Mayami.
Creating a Web Site to Gather Data and Conduct Research.
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.
DUE Hello World on the Android Platform.
CS378 - Mobile Computing Intents.
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.
INTRODUCTION TO ANDROID. Slide 2 Application Components An Android application is made of up one or more of the following components Activities We will.
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.
Understand applications and their components activity service broadcast receiver content provider intent AndroidManifest.xml.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
Services Background operating component without a visual interface Running in the background indefinitely Differently from Activity, Service in Android.
Lecture 2: Android Concepts
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.
CS371m - Mobile Computing Intents 1. Allow us to use applications and components that are already part of Android System – start activities – start services.
Introduction to Android Programming
The Basics of Android App Development Sankarshan Mridha Satadal Sengupta.
Cosc 4735 Nougat API 24+ additions.
Workshop by T.Naveen sai kumar.
Lab7 – Appendix.
Android Application -Architecture.
Intents and Broadcast Receivers
Lecture 3 Zablon Ochomo Android Layouts Lecture 3 Zablon Ochomo
Lecture 2: Android Concepts
Android 01: Fundamentals
Android Application Development 1 6 May 2018
Mobile Programming Lecture 2
CS371m - Mobile Computing Services and Broadcast Receivers
Lecture 2 Zablon Ochomo Android Programming Lecture 2 Zablon Ochomo
Instructor: Mazhar Hussain
Android Runtime – Dalvik VM
MAD.
Activities and Intents
Android Mobile Application Development
Broadcast Receivers A Android Component where you can register for system or application events, receive and react to broadcast intent. Each broadcast.
Android Programming Lecture 9
Application Development A Tutorial Driven Course
Activities and Intents
Emerging Platform#3 Android & Programming an App
Mobile Programming Dr. Mohsin Ali Memon.
Introduction to Android
Application Fundamentals
Lecture 2: Android Concepts
Android Overview.
Chapter 5 Your Second Activity.
Mobile Programming Broadcast Receivers.
Presentation transcript:

Application Fundamentals Android Introduction Application Fundamentals

Goal Understand applications and their components Concepts: activity, service, broadcast receiver, content provider, intent, AndroidManifest

Applications Written in Java (it’s possible to write native code – will not cover that here) Good separation (and corresponding security) from other applications: Each application runs in its own process Each process has its own separate VM Each application is assigned a unique Linux user ID – by default files of that application are only visible to that application (can be explicitly exported)

Application Components Activities – visual user interface focused on a single thing a user can do Services – no visual interface – they run in the background Broadcast Receivers – receive and react to broadcast announcements Content Providers – allow data exchange between applications

Activities Basic component of most applications Most applications have several activities that start each other as needed Each is implemented as a subclass of the base Activity class

Activities – The View Each activity has a default window to draw in (although it may prompt for dialogs or notifications) The content of the window is a view or a group of views (derived from View or ViewGroup) Example of views: buttons, text fields, scroll bars, menu items, check boxes, etc. View(Group) made visible via Activity.setContentView() method.

Services Does not have a visual interface Runs in the background indefinitely Examples Network Downloads Playing Music TCP/UDP Server You can bind to a an existing service and control its operation

Broadcast Receivers Receive and react to broadcast announcements Extend the class BroadcastReceiver Examples of broadcasts: Low battery, power connected, shutdown, timezone changed, etc. Other applications can initiate broadcasts

Content Providers Makes some of the application data available to other applications It’s the only way to transfer data between applications in Android (no shared files, shared memory, pipes, etc.) Extends the class ContentProvider; Other applications use a ContentResolver object to access the data provided via a ContentProvider

Intents An intent is an Intent object with a message content. Activities, services and broadcast receivers are started by intents. ContentProviders are started by ContentResolvers: An activity is started by Context.startActivity(Intent intent) or Activity.startActivityForResult(Intent intent, int RequestCode) A service is started by Context.startService(Intent service) An application can initiate a broadcast by using an Intent in any of Context.sendBroadcast(Intent intent), Context.sendOrderedBroadcast(), and Context.sendStickyBroadcast()

Shutting down components Activities Can terminate itself via finish(); Can terminate other activities it started via finishActivity(); Services Can terminate via stopSelf(); or Context.stopService(); Content Providers Are only active when responding to ContentResolvers Broadcast Receivers Are only active when responding to broadcasts

Android Manifest Its main purpose in life is to declare the components to the system: <?xml version="1.0" encoding="utf-8"?> <manifest . . . >     <application . . . >         <activity android:name="com.example.project.FreneticActivity"                   android:icon="@drawable/small_pic.png"                   android:label="@string/freneticLabel"                   . . .  >         </activity>         . . .     </application> </manifest>

Intent Filters Declare Intents handled by the current application (in the AndroidManifest): <?xml version="1.0" encoding="utf-8"?> <manifest . . . >     <application . . . >         <activity android:name="com.example.project.FreneticActivity"                   android:icon="@drawable/small_pic.png"                   android:label="@string/freneticLabel"                   . . .  >             <intent-filter . . . >                 <action android:name="android.intent.action.MAIN" />                 <category android:name="android.intent.category.LAUNCHER" />             </intent-filter>             <intent-filter . . . >                 <action android:name="com.example.project.BOUNCE" />                 <data android:mimeType="image/jpeg" />                 <category android:name="android.intent.category.DEFAULT" />             </intent-filter>         </activity>         . . .     </application> </manifest> Shows in the Launcher and is the main activity to start Handles JPEG images in some way