4

I'm creating an android application that creates an outgoing call and picks up the event that the call was answered. I would like to be able to test this without having the call to be actually made or picked up on the other side, by somehow mocking/faking the call.

Ideally I want to run the app on a (genymotion) emulator and when an outgoing call is initiated by my app through an Intent, automatically an event is broadcasted that is picked up by my BroadCastReceiver. I think this event is CALL_STATE_OFFHOOK, although it looks like this event is broadcasted as soon as the call is starting, before the other end picks up.

Does anybody know a good way to do this mocking of outgoing calls?

0

1 Answer 1

1

enter image description hereUsing the android simulator and the DDMS you can archive that. More info here: http://developer.android.com/tools/help/emulator.html#calling and http://developer.android.com/tools/debugging/ddms.html#using-ddms

2
  • Thanks for the help. I actually prefer using the Genymotion emulator and IntelliJ IDE, instead of the Android emulator and Eclipse. I'm willing to give it a try though, for testing purposes. I see in the screenshot how to fake incoming calls. Can DDMS also catch outgoing calls?
    – Theodorus
    Feb 10, 2015 at 20:48
  • You can use two emulators. Give a look at this post: stackoverflow.com/questions/20035650/… Feb 11, 2015 at 10:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.