2

I am looking for a way how to automate incoming calls for testing with MonkeyTalk. That means I can run some external scripts. In our Continuous Integration tool I need something capable of running in the headless mode.

WHAT I TRIED

  1. DDMS
  2. Telnet
  3. ADB

DDMS from Eclipse is not the way to go as it supports only GUI.

Telnet seemed like a good choice but it's a pain in the ass to write some command line scripts for it. In Windows I didn't make it. There exists some ways in Linux though.

ADB offers only outgoing calls by using the famous

adb shell am start -a android.intent.action.CALL tel:1112223333

With ADB I also tried to invoke a broadcast with extra state ringing but NO...

QUESTION

How can I fake an incoming call to an emulator using a script? I need to set my own number, of course.

halfer
  • 19,824
  • 17
  • 99
  • 186
Amio.io
  • 20,677
  • 15
  • 82
  • 117

1 Answers1

0

On google's android studio I think it gives you access to internet & google accounts. You could just log in, install "hangouts dialer" from the play store, then (on another phone, with a different google account) call the previously used google account. I haven't tested this though, and I don't know if the phone handles this as an actual call or just opens hangouts.

Alternatively, you could just set up two emulator instances and dial the console port number, in the window title "Android Emulator #####", as said in this question.

Community
  • 1
  • 1
James Fenn
  • 109
  • 1
  • 14
  • 1
    Thx for the answer. I am not developing Android anymore so I don't have any means how to check that the answer is correct. If somebody says this solution works I will mark it as the correct answer. – Amio.io May 17 '16 at 09:11
  • @zatziky I didn't realize when I was writing this, but my answer is essentially the same as the one below - 5554 is the default port number for the android emulators, I just messed up a couple things. Refer to this question for a slightly more specific answer: http://stackoverflow.com/questions/4964703/fake-incoming-call-android – James Fenn May 17 '16 at 22:45