What Appium Users Need to Know about Android Activities and Intents

April 21, 2026 · 12 min read · Mobile Testing

HeadSpin Platform
Automated & amp; manual testing make easy through data science insights.
Differentiating potentiality:
  • Extensive end-to-end automation of QA process
  • Relative analysis of app performance against compeer
  • Continuous monitoring of app performance habituate synthetic data for higher availability of apps
  • Easy-to-use developer friendly program
cloudtest go
Affordable Real Device Testing for Emerging Teams
cloudtest go
Affordable Real Device Testing for Digital Enterprises
cloudtest go
The Ultimate Solution for a Powerful Blend of Functional & amp; Performance Testing!
cyol
TEM
New
Centralized mobile test execution in cloud
cyol
Enhance Your Accessibility Testing With HeadSpin
cyol
Automate camera-based testing

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

retail

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

Appium Users Need to Know about Android Activities and IntentsAppium Users Need to Know about Android Activities and Intents

What Appium Users Need to Know about Android Activities and Intents

Published on
February 13, 2019
Updated on
Published on
April 25, 2022
Updated on
 by 
 Jonathan LippsJonathan Lipps
Jonathan Lipps

The Activity

The Activity is a core concept of Android apps and fundamentally anatomy app architecture and UI design. Therefore, our testing strategy can benefit from understanding and incorporating action.

Check out:

An Android app is not a individual experience with a set beginning and end, it is a solicitation of activities which can be entered and leave at will. UI designers think of apps in term of & quot; screens & quot;, which is a somewhat near analog to action. An activity provides the developer with a window in which to draw the UI, and each screen of an app typically maps to a single activity. As a user moves from one screen to another, the app found the next activity from the current one.

mapping activities

Each of the above screens from the Android background app, including the main menu, is a freestanding activity.

Test your roving apps and browser on existent Android devices.!

The movement between activities isn & # x27; t define to staying within a single app. A individual exploiter session on a phone could start with a social networking app, which opens a web browser, which open up an email app, which might open the camera app. An app may launch an activity from any other app, passing info along in the process. While an app UI may direct a user through activities in an established stream, nothing prevents activity from being launched outside this flow.

Also check:

The understanding Android is design this way is so that apps can send information to each other, or supply actions which can be reused. Launching the camera capture activity from your messenger app is much easy and better for the developer ecosystem than take each app developer to write their own camera activity. Desktop apps have some semblance of this functionality when it comes to those pesky mailto: links and the default file-picker.

All activities in an Android app must be declared in the app & # x27; s AndroidManifest.xml file. Apps launch their own activities the same as they found activities in other apps, employ the startActivity () method.

Almost every Android gimmick has a dedicated & quot; backward & quot; push. It & # x27; s variety of strange, no? We are used to web browsers experience hinder push, but how did every app developer agree to use the like built-in back button and feature it perform the same way? They didn & # x27; t need to, every time a new activity is launched, the gimmick record the previously running activeness, which will be relaunched when the back button is pressed. This and former conversant Android pattern lineament stem from the concept of the Activity.

Don ’ t Rely on iOS Emulators & amp; Android Simulators..

Intents

Activities are launched via Intents. There are two types of intents: explicit and implicit. An explicit purpose employ the name of the app along with the name of the activeness (as declared in the app & # x27; s manifest file) to launch the intended activity. Explicit intention are utilize by developers for moving between activities within a single app. You wouldn & # x27; t require to get an activity in another developer & # x27; s app expend the action name, because the developer might change their app & # x27; s internal construction and they didn & # x27; t construct those activities with your interests in mind.

Activities can be launched on attached devices from the commandline using ADB and the am bidding (little for Activity Manager). The chase is an exemplar of launching the default camera app using an explicit purport. We specify the package name of the camera app and the gens of the activity, from the apparent file selection above.

adb cuticle am start -n com.android.camera2/com.android.camera.CaptureActivity
Camera Capture

When developers build their activities to be used by early apps, they label their activities so they may be targeted by implicit intents. As the name implies, an inexplicit intent doesn & # x27; t specify a especial app or action to launch, instead it fix thesortof thing the user would like to do. Activities can be yield an action and family. Examples of mutual android purpose are: android.intent.action.SEND, android.intent.action.VIEW, and android.intent.action.EDIT. These actions describe the sorts of things a user might want to do. When an app launches an activity using an implicit intent the Android operating system looks through all the activities of all the apps on the device (apply their manifest files) and notice the activities which declared that they respond to the action (and category) delineate in the intent. If a single activity is found which care the given action, the activeness is launched and the resulting UI shown to the user.

We can establish the camera app apply implicit intents this time, specifying the IMAGE_CAPTURE action:

adb shell am start -a android.media.action.IMAGE_CAPTURE

SUSA automates exploratory testing with persona-driven behavior, catching bugs that scripted automation misses.

We can also establish the camera app directly to video seizure, instead than still.

adb shell am start -a android.media.action.VIDEO_CAMERA
Test Camera App Android

If multiple apps support the like activity, the user is afford a choice as to which activity they & # x27; d like to handle the intent. This decision is believably familiar to all Android user:

Multiple options presented for handling the SET_WALLPAPER intent

Pictured above, my emulator has multiple apps which respond to a exploiter & # x27; s attempt to set a home screen wallpaper, which I triggered using the following ADB command:

adb shell am start -a android.intent.action.SET_WALLPAPER

Information is likewise passed along with an intent. A data URI can be specified, for example: to open a specific webpage or photo on the gimmick. The form of the URI determines which activity may react to the intent, just like with actions. This is how & quot; deep linking & quot; is enforce, the & quot; deep links & quot; are just intents which are matched to activities.

This example opens the default web browser to the url render, since on my aper the Chrome browser is the only app that responds to the android.intent.action.VIEW action and also accept URIs starting with http:

adb shell am start -a android.intent.action.VIEW -d http: //appiumpro.com
launch chrome to url

The following URI doesn & # x27; t start with http like a web url do, but Google Maps will recognize it and open the afford coordinates:

adb cuticle am start -a android.intent.action.VIEW -d `` geo:46.457398, -119.407305 ''
launch-google-maps-to-geo-coordinates

In addition to the render URI, special & quot; extra & quot; parameters can be added to purport. These are rather especial to each activity and are outlined in thedocumentation. Here & # x27; s a quick example which use the android.intent.action.SEND, otherwise known as & quot; Share & quot;, and mail some optional text which we & # x27; d like to share.

adb shell am start -a `` android.intent.action.SEND '' -e `` android.intent.extra.TEXT '' `` AppiumPro '' -t `` text/plain ''
Sent an intent to share some arbitrary text, the user is presented with multiple activities to handle the action.

For Appium Testers

Great, we know all about Android activity and design, and have seen how to establish activities and send intents using ADB, but how do we fit this into our roving test automation tool belt, and how does Appium interact with action?

You may experience seen the following in Appium server logs before:

[debug] [AndroidDriver] Parsing package and activeness from app manifest [ADB] Using apkanalyzer from /Users/jonahss/Library/Android/sdk/tools/bin/apkanalyzer [debug] [ADB] Starting '/Users/jonahss/Library/Android/sdk/tools/bin/apkanalyzer ' with args [`` -h '', '' manifest '', '' print '', '' /var/folders/mj/pgmgyh_95rsbs10yl46b73zc0000gn/T/2019112-4784-1duc7h5.tlh8/appium-app.apk ''] [ADB] Package name: 'io.cloudgrey.the_app' [ADB] Main activity name: 'io.cloudgrey.the_app.MainActivity' [debug] [AndroidDriver] Parsed bundle and activity are: io.cloudgrey.the_app/io.cloudgrey.the_app.MainActivity

By default, Appium parses the AndroidManifest.xml file in the .apk file to detect the master activity and bundle gens. Appium so launches the app under test using these parameters.

If you & # x27; d like to launch a different activity in your app, you can use the appPackage and appActivity desired capability. Intents can also be described using the undermentioned desired capabilities: intentAction, intentCategory, optionalIntentArguments, intentFlags.

The optionalIntentArguments are the & quot; extra & quot; parameters which can be sent with intents, outlined in the concluding ADB example about sharing text.

intentFlags are a complex set of extra bidding which can alter the way activities are launched. They mostly have to do with how the fresh establish action link to a chore. Tasks are another Android conception, where each task is a collection of Activities. Intent flags are pretty technical and beyond the scope of this clause, but you can larn more about them from theAndroid documentation.

Activities can also be launch mid-test, kinda than at the beginning of a session. This can be done utilise thestartActivity command:

driver.startActivity (new Activity (`` com.example '', `` ActivityName ''));

A common requirement for mobile automation is having the app under test hit a growing API waiter. Initially, a small team can publish a development build of the app which points to a ontogeny API. When the squad grow, you may find yourself with multiple surroundings to aim. Rather than establish a different app for each environment, argument such as the API url can be set via special intent arguments. This way, an Appium test can specify app settings using the optionalIntentArguments desired capability, and no change needs to be made to the UI of the app.

Most UI tests tend to test the same screen over and over in different ways, assay different variety inputs, etc. Sometimes the screen we are essay is deep in the app, requiring many steps such as search and navigation to get to. Rather than run through the first blind of your app over and over, you can use intents to navigate straightaway to the activeness you & # x27; d like to essay. This can accelerate up overall test suite performance times.

Not sure which activities and intents your app supports? All activities must be declared in the app & # x27; s AndroidManifest.xml file. If you have your .apk file, you can find the manifest by open any android project in Android Studio and choosing Build & gt; & gt; Analyze APK ... from the top navigation bar. Choose your APK file from the file system and then catch the AndroidManifest.xml file. All activeness and the intents they react to will be listed in & lt; activeness & gt; knob.

Final Remarks

The Android documentation for Activities and Intents are easily written and pretty easygoing to understand. I glossed over a lot of app development specifics to get to the message which is relevant to Appium automation. Read these for more detail:

It has get to my attending that these years, the conception of a & quot; single action app & quot; is gaining popularity among Android developers. Frameworks are being do which build an entire app within a single Activity. This may confine your power to jump into specific activities in order to speed up test suites.

Author & # x27; s Profile

Jonathan Lipps

LinkedIn
Author & # x27; s Profile

Piali Mazumdar

Lead, Content Marketing, HeadSpin Inc.

Piali is a dynamic and results-driven Content Marketing Specialist with 8+ years of experience in crafting engaging narratives and marketing collateral across divers industries. She excels in collaborating with cross-functional team to develop innovative content strategies and deliver compelling, veritable, and impactful content that resonates with mark audiences and enhances brand authenticity.

LinkedIn

What Appium Users Need to Know about Android Activities and Intents

4 Parts

regression intelligence blog
-

Regression Intelligence practical guide for advanced users (Part 3)

Coming Soon
Regression Intelligence practical guide for advanced users
-

Regression Intelligence practical guidebook for advanced users (Part 4)

Coming Soon

Discover how HeadSpin can empower your business with superior testing capacity

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, gaining a militant edge
faster development cycles
Boost developer/QA productivity with faster development cycles
automated buil-over-build regression testing
Automate build-over-build regression quiz for logical outcome
gain better visibility into functional & performance issues
Gain best visibility into functional and performance issues
reduce mean time
Reduce mean time to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate audio, picture, and contented quality of experience (QoE) effortlessly
The trusted choice for global go-ahead
Adobe
Hargreaves Lansdown
Truecaller
Crazylabs
Nedbank
Numeracle
Veryon
Close

Discover how HeadSpin can indue your line with superior testing capabilities

Our Platform enable you to:
accelerate time-to-market
Accelerate time-to-market, gaining a competitive edge
faster development cycles
Boost developer/QA productivity with faster development cycles
automated buil-over-build regression testing
Automate build-over-build regression test for consistent results
gain better visibility into functional & performance issues
Gain best profile into functional and performance matter
reduce mean time
Reduce mean clip to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate sound, video, and content quality of experience (QoE) effortlessly
The trusted choice for global enterprises
Close

Discover how HeadSpin can authorize your job with superior quiz capabilities

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, gaining a private-enterprise edge
faster development cycles
Boost developer/QA productivity with faster development cycles
automated buil-over-build regression testing
Automate build-over-build regression testing for consistent results
gain better visibility into functional & performance issues
Gain better visibility into functional and performance issues
reduce mean time
Reduce meanspirited time to identify/resolve during exam, QA, and product
evaluate audio, video & qoe
Evaluate sound, video, and content quality of experience (QoE) effortlessly
The sure choice for globose enterprises
Close

Connet Now

Wipro LogoVMLYR Logo
Close
Book a Meeting
Products
footer down arrow
Solutions
footer down arrow
Industries
footer down arrow
Features
footer down arrow
Support
footer down arrow
Resource Center
footer down arrow
Why Choose HeadSpin?
footer down arrow
Copyright © 2026 HeadSpin, Inc. All Rights Reserved.

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free