ADB command to make call

Suppose you have to make call automatically using adb command then you must be familiar with below adb commands, which will make your job easy.


There are two ways through which a call can be made using adb command

1. Using intent

                adb shell am start -a android.intent.action.CALL -d tel:$no
Starting: Intent { act=android.intent.action.CALL dat=tel:xxxxxxxxxxx }

Using this adb command you would be directly landed on calling screen as shown below.The main advantage of using this command is that you won't have to use any other extra supporting commands to make a call.


2. Using shell service adb command
                   
adb shell service call phone 1 s16 "81xxxxxx00"
Result: Parcel(00000000    '....')

Once you trigger above adb command it will open your dialer app with the number. Here you just have to tap on the call button to make the call, which can be done either by identifying the element using ui automator or by using co ordinates.

3 comments:

  1. Hi,

    Can you help sharing ADB command to dial numbers like #N11 or *N11 or **N11 etc. where N = 1-9

    Thanks in advance,
    BR//
    Abinash

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete

Feature Posts

Python Appium - Step by step procedure for capturing screenshot

 Why To capture screenshot? It is as important as your logs. If there is any failure for any test scenario, we can provide screenshot for th...