Search code examples
androidlinuxadbandroid-phone-call

Making voice calls from Android phone connected to Linux


I have an Andorid phone connected to a Linux server. I need a bash script to use the phone to dial a number and read out a string when the call is answered.

I have ADB installed on the Linux server and the following code works fine for dialling a number:

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

However I am not sure how to get it to read a string and then disconnect the call. Is there a text to speech for ADB/Android that could help me here?


Solution

  • I have found out that it is almost impossible to play a voice during the call due to security restrictions on Android.