1. Check out our companion app, Forums for Android! Download from Google Play

Call Hang up

Discussion in 'Application Development' started by sourabh_d, Nov 19, 2009.

  1. sourabh_d

    sourabh_d Member
    Thread Starter
    5

    Oct 29, 2009
    5
    0
    5
    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
    16

    Nov 14, 2009
    46
    1
    16
    Linux Admin
    USA
    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
    Thread Starter
    5

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

    Tac-Tics New Member
    5

    Dec 2, 2009
    2
    0
    5
    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
    16

    Nov 14, 2009
    46
    1
    16
    Linux Admin
    USA
    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...