Professional Documents
Culture Documents
Intent
Intent is an object carrying an intent ie. message from one component to
another component with-in the application or outside the application. The
intents can communicate messages among any of the three core components
of an application - activities, services, and broadcast receivers
ACTION:
The action is a string that identifies the operation to be carried out. Common
action examples include opening a web page, sending an email, or playing a
media file.
Actions are the mandatory part of the Intent object and is a string naming the
action to be performed — or, in the case of broadcast intents, it is the action
that took place and is being reported.
ACTION_VIEW:
Opens the content specified by a URI, such as a web page, image, or
document
ACTION_SEND:
Sends data to another activity or service, often used for sharing content
like text, images, or files.
ACTION_DIAL:
Initiates a phone call, allowing the user to dial a specified phone number.
ACTION_CAMERA:
Opens the device's camera for capturing photos or videos.
ACTION_WEB_SEARCH:
Performs a web search using the specified query, opening the default
web browser.
ACTION_SENDTO:
Sends data to a specific recipient, such as an email address or phone
number.
ACTION_BATTERY_CHANGED:
Broadcast action indicating that the device's battery status has changed,
often used by apps monitoring battery levels.