• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Call Hang up

sourabh_d

Lurker
Hello,

I am devloping an application where i want to programatically
connect and disconnect the call. I am able to connect the call
by simply using the

Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:+"+text.getText().toString()));

But i dont know how to disconnect the call through program since
there is no direct api to disconnect the call. Is there any other way to
do this. Plz provide some guidance regarding the same.


Regards,
Sourabh
 
If the intent owns the phonecall (so to speak) then maybe deleting the intent will hang up the call and clean up?

something like:
intent = null;

??
 
If the intent owns the phonecall (so to speak) then maybe deleting the intent will hang up the call and clean up?

something like:
intent = null;

??

This doesn't delete the intent. The JVM won't delete it until it is garbage collected, but it probably won't do that as long as the activity is running.

I don't know enough about the Activity model to answer your question, but from what I understand, I believe once you call a new activity (your phone call), you surrender all control to that activity. In other words, it may not be possible to end a call.
 
I did a google search and found 3-4 hits indicating that it's just not supported right now. Hanging up the phone from an app, that is.
 
Back
Top Bottom