Intents

Each activity is started or activated with an Intent, which is a message object that makes a request to the Android runtime to start an activity or other app component in your app or in some other app.

Intent types

  • Explicit intent: You use explicit intents to start components in your own app (for example, to move between screens in the UI).

  • Implicit intent: You do not specify a specific activity or other component to receive the intent. Instead, you declare a general action to perform, and the Android system matches your request to an activity or other component that can handle the requested action.

Implicit intent

passing extra data to next activity

Getting data on target activity

An example for implicit intent(take picture using camera)

Implement on onCreateView method

override onActivityResult method

Last updated

Was this helpful?