Call Hang up


Last Updated:

  1. sourabh_d

    sourabh_d Member This Topic's Starter

    Joined:
    Oct 29, 2009
    Messages:
    5
    Likes Received:
    0
    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
     

    Advertisement
  2. regulatre

    regulatre Well-Known Member

    Joined:
    Nov 14, 2009
    Messages:
    46
    Likes Received:
    1
    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;

    ??
     
  3. sourabh_d

    sourabh_d Member This Topic's Starter

    Joined:
    Oct 29, 2009
    Messages:
    5
    Likes Received:
    0
    Yes i have alredy tried this but it doesnot work. Any other alternative?
     
  4. Tac-Tics

    Tac-Tics New Member

    Joined:
    Dec 2, 2009
    Messages:
    2
    Likes Received:
    0
    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.
     
  5. regulatre

    regulatre Well-Known Member

    Joined:
    Nov 14, 2009
    Messages:
    46
    Likes Received:
    1
    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.
     

Share This Page

Loading...