Context :
I am developing an android dialer app ( Phone app ) Via which app dial pad, app call management is done.
This is my dial pad :
You see *123# is typed
The Sim Selection :
Sim selection bottom dialog
What code is running in bottom dialog :
Log.d("CALL", "to :" + dialNumber + ".. \n");
intent.setData(Uri.parse("tel:"+dialNumber));
intent.putExtra("com.android.phone.force.slot", true);
Log.d("CALL", "ACCOUNTS :" + phoneAccountHandleList.size() + ".. \n");
if (sim == 0)
{
intent.putExtra("com.android.phone.extra.slot", 0);
if (phoneAccountHandleList != null && phoneAccountHandleList.size() > 0)
{
intent.putExtra("android.telecom.extra.PHONE_ACCOUNT_HANDLE", phoneAccountHandleList.get(0));
}
}
else
{
intent.putExtra("com.android.phone.extra.slot", 1);
if (phoneAccountHandleList != null && phoneAccountHandleList.size() > 1)
{
intent.putExtra("android.telecom.extra.PHONE_ACCOUNT_HANDLE", phoneAccountHandleList.get(1));
}
}
context.startActivity(intent);
InCallService manage call :
Within the InCallService i manage calls. If a call is added then i starts CallActivity from below code
callType = CallType.CALL_OUT;
Call.Details details = call.getDetails();
String CallingNumber = details.getHandle().getSchemeSpecificPart();
CallActivity.start(this, CallingNumber, callType, false);
My CallActivity :
What are my problems :
- You can see above i had dialed *123# from dialer, But it is just calling *123
- It must not have started the Call Activity, Instead it must have requested it as MMI CODE
Any help or guidance is appreciated, Thank you in advance.