I would like to make call via ADB command on android's command line.
How should I use ADB command in order to make a call via PC?
please provide source code.
Open a command window in the folder by holding shift and right-clicking in an empty spot in the folder and selecting "Open command prompt/PowerShell here" in the menu. Then you can start using ADB — connect your phone and try . ADB devices to see if it's working. A list with attached devices should show up.
Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.
You should do (replace <serialno> by the serial number of your device or emulator, for example emulator-5554):
$ adb -s <serialno> shell am start -a android.intent.action.CALL -d tel:555-5555
and see this in the logcat:
Starting: Intent { act=android.intent.action.CALL dat=tel:xxx-xxx-xxxx }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With