0

I am using this code to make call

Intent callIntent = new Intent(Intent.ACTION_CALL,
                                  Uri.parse("tel:" + phoneNumber));
startActivity(callIntent);

and I want to disconnect call after hear first ringing to leave a miss call on the destination phone.

Kara
  • 6,115
  • 16
  • 50
  • 57
Sabrina
  • 2,531
  • 1
  • 32
  • 30

1 Answers1

1

I don't believe that's currently available in the Android sdk. I was trying to control outgoing calls on a project recently but other than dialing a number there's not a lot you can do. My last project needed to place a call, press a button, then hangup. For that I ended up setting up an Asterisk server that listened to a web page. You could do something similar but that would involve using a data connection to your own server.

You can check out these links. I don't like this answer but it's the way it is for now.

How to make a phone call in android and come back to my activity when the call is done?

http://developer.android.com/reference/android/content/Intent.html#ACTION_CALL

If you want to step outside of techniques I would recommend check out the this answer.

Community
  • 1
  • 1
dkwiebe
  • 193
  • 1
  • 10