Possible Duplicate:
How to make a phone call in android and come back to my activity when the call is done?
The call is being initiated from the app via startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phNo)));
. After the call ends, I do not return to the app, but to the phone's desktop.
What am I doing wrong? Is it possible to return to the app that has initiated the call? I am not sure if this is allowed in Android.
EDIT: Code added
@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;
//... other switch statements