Download presentation
Presentation is loading. Please wait.
Published bySigne Engebretsen Modified over 5 years ago
1
It is used to Start an Activity Start a Service Deliver a Broadcast
Intents It is used to Start an Activity Start a Service Deliver a Broadcast
2
Explicit Intent Implicit Intent
Intent Types Explicit Intent Implicit Intent
3
Explicit Intents Specify the component to start by name (fully quailed name) Typically used to start activities within the same application or to start a service in response to user interaction When you create an explicit intent to start an activity or service, the system immediately starts the app component specied in the Intent object
4
Implicit Intents Do not specify a specic component but instead declare a general action to perform The system figures out the appropiate app/activity to handle it For example, opening Google Maps to show the location from your app or Share or Phone.
5
Resolution of Implicit Intents
Activity A creates an Intent with an action description and passes it to startActivity(). The Android System searches all apps for an intent filter that matches the intent. When a match is found The system starts the matching activity (Activity B) by invoking its onCreate() method and passing it the Intent
6
Building an Intent Component Name The name of the component to start. Critical for Explicit Intents Action A string that species the generic action to perform (such as view or pick) Data The URI object that references the data to be acted on and/or the MIME type of that data Category A string containing additional information about the kind of component that should handle the intent Extras Key-value pairs that carry additional information required to accomplish the requested action Flags Flags defined in the Intent class that function as metadata for the intent
7
Questions ?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.