Simulating Incoming Phone Calls On Android

April 17, 2026 · 7 min read · Mobile Testing

HeadSpin Platform
Automated & amp; manual examination made easy through datum skill insights.
Differentiating capabilities:
  • Panoptic end-to-end automation of QA process
  • Comparative analysis of app performance against match
  • Continuous monitoring of app performance using synthetic data for higher handiness of apps
  • Easy-to-use developer friendly program
cloudtest go
Low-priced 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

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

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

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

Simulating Incoming Phone Calls On AndroidSimulating Incoming Phone Calls On Android

Simulating Incoming Phone Calls On Android

Published on
November 7, 2018
Updated on
Published on
May 15, 2022
Updated on
 by 
 Jonathan LippsJonathan Lipps
Jonathan Lipps

In the past, we & # x27; ve covered how to imitate on Android emulators. It is also potential to receive and interact with incoming phone name! This might be relevant for apps that engage with the phone subsystem in some way, or it might just be a good idea to test that nothing goes wrong in your app when someone takes a call while using it.

Why rely on model when you have the opportunity to conduct Android apps try on literal devices?.

(Of course, this lone act on emulators; to reach the like upshot on a real gimmick, just make sure the real gimmick has a work SIM card and trigger a call to it employ one of the available phone call mechanisation service.)

Test your apps on real device and get precise results..

How can we occupy advantage of this lineament? It & # x27; s made available in the Appium Java client via thedriver.makeGsmCall ()method. This method takes two parameters:

For autonomous testing across multiple user personas, check out SUSATest — it explores your app like 10 different real users.

  1. A string symbolise the phone number which the imitator will show as calling it (this should be purely numbers, no dashes or excursus).
  2. A member of theGsmCallActionsenum, namely one ofGsmCallActions.CALL, GsmCallActions.CANCEL, GsmCallActions.ACCEPT, orGsmCallActions.HOLD. Each of these defines an activeness the emulator will direct with respect to the particular phone number that has called.
Check out:

Basically, to initiate a call to the emulator, we first get a call like this:

driver.makeGsmCall (`` 1234567890 '', GsmCallActions.CALL);

This will get the device & quot; ringing & quot;. At this point it will continue to resound until we postdate up with another activity. We may, for example, choose to consent the call:

driver.makeGsmCall (`` 1234567890 '', GsmCallActions.ACCEPT);

At this point the call will be active, and will remain active until we select to end it:

driver.makeGsmCall (`` 1234567890 '', GsmCallActions.CANCEL);

Using this series of commands, we can simulate the entire flow of a user receiving a phone call while in our app, accepting the call, continuing to go about her business in the app while the call is active, and then ending the call. At any point in this flow, we can continue to run veritable Appium bidding, which is how we would check that our app continues to function normally yet as the call takes place.

Also check:

That & # x27; s it! Take a look at the full example below, which introduces some artificial pauses in the course of the script so you can see the activity taking property (otherwise it all happens too quickly): Using this series of commands, we can simulate the entire flowing of a user receiving a phone call while in our app, accepting the call, continue to go about her business in the app while the call is active, and so finish the yell. At any point in this flow, we can continue to run veritable Appium commands, which is how we would control that our app continues to function normally even as the call takes place.

Continuously monitor and optimize quality of experience across coating, devices and 3rd-party interface with nomadic app execution testing insights.Learn more.

That & # x27; s it! Take a aspect at the entire instance below, which introduces some artificial pauses in the course of the script so you can see the action taking place (otherwise it all happens too quickly):

signification io.appium.java_client.android.AndroidDriver; import io.appium.java_client.android.GsmCallActions; significance java.net.MalformedURLException; import java.net.URL; import org.junit.After; meaning org.junit.Before; import org.junit.Test; import org.openqa.selenium.remote.DesiredCapabilities; public family Edition042_Android_Phone {individual AndroidDriver driver; private String APP = `` https: //github.com/cloudgrey-io/the-app/releases/download/v1.7.1/TheApp-v1.7.1.apk ''; private String PHONE_NUMBER = `` 5551237890 ''; @ Before public void setUp () throws MalformedURLException {DesiredCapabilities capabilities = new DesiredCapabilities (); capabilities.setCapability (`` platformName '', `` Android ''); capabilities.setCapability (`` deviceName '', `` Android Emulator ''); capabilities.setCapability (`` automationName '', `` UiAutomator2 ''); capabilities.setCapability (`` app '', APP); driver = new AndroidDriver (new URL (`` http: //localhost:4723/wd/hub ''), capabilities);} @ After public void tearDown () {if (driver! = null) {driver.quit ();}} @ Test world void testPhoneCall () throw InterruptedException {// do something in our app driver.findElementByAccessibilityId (`` Login Screen '') .click (); // receive and accept a call driver.makeGsmCall (PHONE_NUMBER, GsmCallActions.CALL); Thread.sleep (2000); // hesitate only for event driver.makeGsmCall (PHONE_NUMBER, GsmCallActions.ACCEPT); // continue to do something in our app driver.findElementByAccessibilityId (`` username '') .sendKeys (`` hi ''); Thread.sleep (2000); // pause but for effect // end the call driver.makeGsmCall (PHONE_NUMBER, GsmCallActions.CANCEL); Thread.sleep (2000); // pause just for effect}}

Of course, you can likewise have a expression at the sampleon GitHub.

Author & # x27; s Profile

Jonathan Lipps

LinkedIn
Author & # x27; s Profile

Piali Mazumdar

Lead, Content Marketing, HeadSpin Inc.

Piali is a dynamical and results-driven Content Marketing Specialist with 8+ days of experience in crafting engaging narratives and marketing collateral across divers industries. She excels in cooperate with cross-functional teams to germinate advanced content strategies and render compelling, veritable, and impactful substance that resonate with target audience and enhances marque legitimacy.

LinkedIn

Simulating Incoming Phone Calls On Android

4 Parts

regression intelligence blog
-

Regression Intelligence practical usher for advanced users (Part 3)

Coming Soon
Regression Intelligence practical guide for advanced users
-

Regression Intelligence practical guide for advanced users (Part 4)

Coming Soon

Discover how HeadSpin can invest your business 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 quicker 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 better visibility into functional and performance subject
reduce mean time
Reduce mean clip to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate audio, picture, and content quality of experience (QoE) effortlessly
The sure choice for global enterprises
Adobe
Hargreaves Lansdown
Truecaller
Crazylabs
Nedbank
Numeracle
Veryon
Close

Discover how HeadSpin can endow your occupation with superior quiz capabilities

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

Discover how HeadSpin can empower your concern with superior examine 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 growth cycles
automated buil-over-build regression testing
Automate build-over-build regression testing for coherent results
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 examination, QA, and product
evaluate audio, video & qoe
Evaluate audio, video, and content calibre of experience (QoE) effortlessly
The sure choice for global 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