COMP 365 Android Development.  Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical.

Slides:



Advertisements
Similar presentations
Application Fundamentals Android Development. Announcements Posting in D2L Tutorials.
Advertisements

Programming with Android: Activities and Intents Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
Programming with Android: Activities and Intents Luca Bedogni Marco Di Felice Dipartimento di Informatica – Scienza e Ingegneria Università di Bologna.
Presented By Abhishek Singh Computer Science Department Kent state University WILLIAM ENCK, MACHIGAR ONGTANG, AND PATRICK MCDANIEL.
Android activities 1 CS300. What makes an app?  Activities: presentation layer  Services: invisible workers  Content Providers: databases  Intents:
Intents.
Mobile Programming Pertemuan 6 Presented by Mulyono Poltek NSC Surabaya.
Android Security Enforcement and Refinement. Android Applications --- Example Example of location-sensitive social networking application for mobile phones.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
UNIT-V The MVC architecture and Struts Framework.
Understanding Android Security Yinshu Wu William Enck, Machigar Ongtang, and PatrickMcDaniel Pennsylvania State University.
Introducing the Sudoku Example
박 종 혁 컴퓨터 보안 및 운영체제 연구실 MobiSys '11 Proceedings of the 9th international conference on Mobile systems, applications,
 Understanding an activity  Starting an activity  Passing information between activities  Understanding intents  Understanding the activity lifecycle.
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.
Chapter 5: Investigate! Lists, Arrays, and Web Browsers.
Software Architecture of Android Yaodong Bi, Ph.D. Department of Computing Sciences University of Scranton.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Chapter 2: Simplify! The Android User Interface
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 5: Investigate! Android Lists, Arrays,
Data Storage: Part 4 (Content Providers). Content Providers Content providers allow the sharing of data between applications. Inter-process communication.
Rajab Davudov. Agenda Eclipse, ADT and Android SDK APK file Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent Hello World.
Using Intents to Broadcast Events Intents Can be used to broadcast messages anonymously Between components via the sendBroadcast method As a result Broadcast.
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
DUE Hello World on the Android Platform.
CS378 - Mobile Computing Intents.
16 Services and Broadcast Receivers CSNB544 Mobile Application Development Thanks to Utexas Austin.
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, 3E
Configuring Android Development Environment Nilesh Singh.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 2: Simplify! The Android User Interface.
Intent Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Android System Security Xinming Ou. Android System Basics An open-source operating system for mobile devices (AOSP, led by Google) – Consists of a base.
DKU-MUST Mobile ICT Education Center 10. Activity and Intent.
Working with Multiple Activities. Slide 2 Introduction Working with multiple activities Creating multiple views Introduction to intents Passing data to.
Introducing Intents Intents Bind application components and navigate between them Transform device into collection of interconnected systems Creating a.
Lecture 2: Android Concepts
Intents and Broadcast Receivers Dr. David Janzen Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution.
The Ingredients of Android Applications. A simple application in a process In a classical programming environment, the OS would load the program code.
Working with Multiple Activities. Slide 2 Introduction Working with multiple activities Putting together the AndroidManifest.xml file Creating multiple.
Chapter 5: Investigate! Lists, Arrays, and Web Browsers.
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
Android Mobile Application Development
Mobile Applications (Android Programming)
Lecture 2: Android Concepts
Android 01: Fundamentals
Understanding Android Security
Lecture 2 Zablon Ochomo Android Programming Lecture 2 Zablon Ochomo
Reactive Android Development
Instructor: Mazhar Hussain
Android Runtime – Dalvik VM
MAD.
Activities and Intents
Android Mobile Application Development
Android Application Development android.cs.uchicago.edu
Android Programming Lecture 9
Activities and Intents
Android Topics What are Intents? Implicit Intents vs. Explicit Intents
Activities and Intents
Understanding Android Security
Android Developer Fundamentals V2 Lesson 5
Emerging Platform#3 Android & Programming an App
It is used to Start an Activity Start a Service Deliver a Broadcast
Lecture 2: Android Concepts
Presentation transcript:

COMP 365 Android Development

 Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical concerning the entire application and acts as an identifier for numerous properties

 Declares the Java package the application is identified by.  Declares each component of the Android application 1. Activity 2. Service 3. Broadcast Receiver 4. Content Provider  Lists the permissions the application requires to prompt the user and declares permissions that other programs require to interact with itself.

 Declares the minimum level of Android API required to run this application.  Lists the libraries that the application must be linked to.  Declares which processes will host the application components.

 Structured similarly to other XML files in Android development.  Begins with the XML header, following with the element header and numerous elements under it.  Under the element is where you will find component declaration.

<activity android:name= “com.example.androidpracticeproj.MainActivity” android:label= Note: The java package is called com.example.androidpracticeproj. However, you can shorthand the package name like depicted below: <activity android:name= “.MainAcivity” … />

 An Intent is an action or operation to be performed.  Similar to Java Events in that they carry information and a specialized string constant for a particular action that needs to be performed.  Has two data structures 1. Intent.action 2. Intent.data  Intents are primarily used to send data between two app components.

 The general action to be performed, contains a string constant that specifies what action needs to be performed.

 Data to operate on, for example a person record in the contacts database, expressed as a URI. URI stands for Uniform Resource Identifier, which is like a URL but for a file system.

 Intents are usually used in one of these three ways: 1. Starting an Activity 2. Starting a Service 3. Deliver a broadcast

 As described before, an Activity is a single screen in an application. This is done by passing a new instance of an Activity to an Intent to startActivity(). Here the Intent specifies which activity to start and any data required by the new Activity.

 A service is a background program that can process without user input. To start a service, pass an Intent to startService(). Once again, the Intent carries the service and the data. You can also bind the service to a user interface using bindService().

 A broadcast is a message that an application can receive, and is broadcast when certain events occur, like the phone booting up, or being placed to charge. You can broadcast a broadcast by passing an Intent to sendBroadcast(), sendOrderedBroadcast(), or sendStickyBroadcast().

 You can easily integrate your Activity with Android functions by using the Intent object.  Numerous Intents will let you utilize numerous functions of Android, like Android's Camera, Contact list, Messaging, retrieving and sending text/pictures, and so on.

 Start as a main entry point, does not expect to receive data.

 Data: URI for action to be performed on  Display data to the user.  This Intent is very versatile as it displays in different information depending on the uri input. Ex. If used on a contact entry, it will display the contact entry.

 Data: URI to be edited  Gives explicit access to the data provided.  Edit functionality depends on the URI and what kind of data is being edited.

 Data: URI representing a directory from which to pick data  Allows a user to pick from a data from the directory and returns it

 Data: Dial the URI provided, brings up an empty caller if no URI  Dials a number in the dialer, but asks for permission before calling

 Data: Call the URI provided, brings up an empty caller if no URI  Calls a number- requires permissions in the manifest file

 Works with both images and videos  MediaStore.ACTION_IMAGE_CAPTURE - Captures an image using the camera and returns it  MediaStore.ACTION_VIDEO_CAPTURE - Captures a video using the camera and returns it

 Data: URI representing the directory from which the user should select data  This allows the user to select a piece of data and then return it using the MIME type to specify which kind of data should be selected.

 Data: URI representing data to be sent  Sends data.  For example, if the data is a “mailto:” it will use the application, if the data is a “sms”, it will use the messaging application, and etc.