Intent Android Club 2015. Agenda Intent class Explicit activation Implicit activation.

Slides:



Advertisements
Similar presentations
PINTEREST PCNA: Signing Up & Using Pinterest. WELCOME Hello In this tutorial we are going to cover signing up for a Pinterest account & discuss how to.
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.
 An archive file marked by an.apk suffix.  Java code + any data +resource files  is bundled by the aapt tool into an aapt tool ◦ Android Asset Packaging.
Intents.
Intents and Intent Filters.  Intents are data structures that specify  Operations to be performed  Events that have occurred  Broadcast by one component.
Mobile Programming Pertemuan 6 Presented by Mulyono Poltek NSC Surabaya.
Radoncssi.org Google based IT infrastructure Alf Siochi.
Intent An Intent describes the operation to be performed. Intents are used to start an activity using either of the following methods – Context.startActivity()
Web Services 101 James Payne Managing Director for New Media / Advancement July 30, 2013.
Lecture 3 agenda Layouts Intents (both explicit and implicit) ListViews and Adapters.
 Understanding an activity  Starting an activity  Passing information between activities  Understanding intents  Understanding the activity lifecycle.
Rajab Davudov. Agenda Eclipse, ADT and Android SDK APK file Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent Hello World.
Erika Chin Adrienne Porter Felt Kate Greenwood David Wagner University of California Berkeley MobiSys 2011.
CS378 - Mobile Computing Intents.
1 Announcements Homework #2 due Feb 7 at 1:30pm Submit the entire Eclipse project in Blackboard Please fill out the when2meets when your Project Manager.
Signing up to Flashcard machine. Go to and click here:
1 CMSC 628: Introduction to Mobile Computing Nilanjan Banerjee Introduction to Mobile Computing University of Maryland Baltimore County
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
Intent Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
Android Development 1 Yuliana Setiowati Rizky Yuniar Hakkun Ahmad Syauqi Ahsan.
Lec 03 Intents Explicit Intents Implicit Intents.
Cosc 5/4730 Android Communications Intents, callbacks, and setters.
Linking Activities using Intents How to navigate between Android Activities 1Linking Activities using Intents.
How to Use Facebook This guide will help you navigate around the social networking site, Facebook.
How to use outlook 365 By Elliot Routledge. How to open outlook First click the start button in the bottom left hand corner of your screen.
Activity Android Club Agenda Hello Android application Application components Activity StartActivity.
Apps Presented by: Michael Quinzi, Trevis Choates, David McElroy, Diego Gac, and Trey Leonard.
Mobile Programming Midterm Review
Create feedback form in Google Spreadsheet. Go to and open the drive by clicking the link as shown belowwww.google.com.
February 2006Colby College ITS Getting Started with Oracle Calendar.
Applications with Multiple Activities. Most applications will have more than one activity. The main activity is started when the application is started.
Working with Multiple Activities. Slide 2 Introduction Working with multiple activities Creating multiple views Introduction to intents Passing data to.
Lec 04 Intents and Bundles Fragments. Activated by Intents Activities Services Broadcast Receivers (aka Receivers) (
Introducing Intents Intents Bind application components and navigate between them Transform device into collection of interconnected systems Creating a.
Intents 1 CS440. Intents  Message passing mechanism  Most common uses:  starting an Activity (open an , contact, etc.)  starting an Activity.
The Rotary Club of ????? Website. The Web site The short address is This redirects to
How to set up an account- Non-Technical Aimee Lilley.
Lecture 2: Android Concepts
*This power point may not be up to date with our website, since the website design changes. The directions are still the same, do not follow images, since.
How to use Vivo Miles A Student Guide. What is Vivo Miles? Vivo Miles is the new way to be rewarded as you progress through your school life. Teachers.
Intents and Broadcast Receivers Dr. David Janzen Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution.
David Sutton SMS TELEPHONY IN ANDROID. OUTLINE  This week’s exercise, an SMS Pub Quiz  Simulating telephony on an emulator  Broadcast Intents and broadcast.
Your Choices, Your Future A simple guide. All applications for 6 th form places, college courses and apprenticeships will be made through one website.
Working with Multiple Activities. Slide 2 Introduction Working with multiple activities Putting together the AndroidManifest.xml file Creating multiple.
View Invitation Notification. In this Course you learn how to access your open invitations from City of Chicago's iSupplier portal. You will only get.
Editing a Twitter search. Viewing search results in a browser.
CS371m - Mobile Computing Intents 1. Allow us to use applications and components that are already part of Android System – start activities – start services.
Android Mobile Application Development
Android Mobile Applications Course Introduction
Lecture 2: Android Concepts
Android Intent Filters
Programming with Android:
Android 5: Interacting with Other Apps
Linking Activities using Intents
In restaurant online order
Lecture 3 agenda A tour of Android studio features
Mobile Application Development BSCS-7 Lecture # 3
Iteration 1 Presentation
Android Programming Lecture 5
Activities and Intents
Android Topics What are Intents? Implicit Intents vs. Explicit Intents
Add to the Coffee Ordering App
Logging in and sending an on Gaggle.net
Activities and Intents
How to Select and Use Privacy Settings
Activities and Intents
It is used to Start an Activity Start a Service Deliver a Broadcast
Lecture 2: Android Concepts
Mobile Programming Dr. Mohsin Ali Memon.
Presentation transcript:

Intent Android Club 2015

Agenda Intent class Explicit activation Implicit activation

2 purposes Operation to be performed (Send ) Event notification (Telegram message came)

I want to... Select contact Take photo Display map

Intent opens... Activity which can do that operation

Intent fields Action – desired operation Data – data associated with intent Category – additional information Type – show mime type Component – exact activity to open Extras – key-value pair Flags – flag about how intent handled

Action ACTION_DIAL ACTION_VIEW ACTION_SEND ACTION_MAIN

Action: example Intent intent = new Intent(); intent.setAction(Intent.ACTION_DIAL); startActivity(intent);

Data Data associated with intent URI(geo, tel, http)

Data: example Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("geo:0.0,0.0")); startActivity(intent);

Data: practice Create application which opens Tashkent in Google Maps Latitude: Longitude:

Data: example 2 Intent intent = new Intent(); intent.setAction(Intent.ACTION_DIAL); Intent.setData(Uri.parse(“tel: ”); startActivity(intent);

Data: practice 2 Create application which dials your best friends number

Data: example 3 Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(" m")); startActivity(intent);

Data: practice 3 Create application which opens Facebook website

Category Additional information about Intent CATEGORY_BROWSABLE CATEGORY_LAUNCHER

Type Specifies MIME type of Intent image/png, image/jpg text/html, text/html setType() Intent.setType("text/html");

Type: example final Intent Intent = new Intent(android.content.Intent.ACTION_SEN D); Intent.setType("text/html"); Intent.putExtra(android.content.Intent. EXTRA_SUBJECT, subject); startActivity(intent);

Component Intent intent = new Intent(MainActivity.this, ActivityB.class); startActivity(intent);

Component: practice Create ActivityA Create ActivityB Put button on ActivityA which opens ActivityB

Extra Key-value pair Intent intent = new Intent(A.this, B.class); intent.putExtra(“parol”,”1234”); startActivity(intent);

Extra: practice Create ActivityA Create ActivityB Put button which sends “secret information” to ActivityB Secret information: We are members of Android Club Show secret information in ActivityB

Flags How intent should be handled FLAG_ACTIVITY_NO_HISTORY FLAG_ACTIVITY_NO_ANIMATION

Flags: example Intent intent = new Intent(MainActivity.this, ActivityB.class); intent.setFlags(Intent.FLAG_ACTIVITY_CL EAR_TASK|Intent.FLAG_ACTIVITY_NEW _TASK); startActivity(intent);

Flags: practice Create ActivityA Create ActivityB Create ActivityC Put button on A which opens B Put button on B which opens C and close A and C

Activation Explicit (Явный) Implicit (Неявный)

Implicit activation A) Calling activity B) IntentFilter

Intent resolution ACTION DATA CATEGORY

Homework 1: extra Create ActivityA Create ActivityB Put 2 EditTexts: username and password Pass username and password to ActivityB Show them in TextViews

Homework2: flag Create ActivityA Create ActivityB Open ActivityB without animation

Homework3: implicit activation Create ActivityA From ActivityA, startActivity with ACTION_DIAL intent Create ActivityB Define for ActivityB

Homework4: implicit activation Create ActivityA From ActivityA, startActivity with _APP(category) intent Create ActivityB Define for ActivityB

Homework: Action+Data: Try to put ACTION_CALL instead of ACTION_DIAL Tell me what is difference? Do not forget to add android.permission.CALL_PHONE

Questions? Any questions?

Thank you Thank you for your attention!