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 :
Any help or guidance is appreciated, Thank you in advance.
I think you can do:
String encode_hash = Uri.encode("#");
intent.setData(Uri.parse("tel:"+dialNumber + encode_hash));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.