Possible duplicate:
How to make a phone call in android and return to my activity when the call is completed?
The call begins with the application through startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phNo)));. Upon completion of the call, I will not return to the application, but to the desktop of the phone.
What am I doing wrong? Is it possible to return to the application that initiated the call? I'm not sure if this is allowed in Android.
EDIT: Added Code
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
switch ((int) id) {
case 0:
try {
TextView txtCallDisp = (TextView) findViewById(R.id.itmDdd);
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phNo)));
} catch (NullPointerException e) {
e.printStackTrace();
} catch (Exception ee) {
ee.printStackTrace();
}
break;
source
share