I am developing a call recorder application, which is working fine. I want to give the user an option to decide whether to record a call or not. I want to add a button on top of the ongoing call screen, but I am not sure if that is possible. There are some threads which give hint or code to add on top of incoming or outing screen, but I want to add it on top of the ongoing screen.Any help would be appreciated.
//Custom dialog showing after the call has been disconnected, I want to show as soon as the call has been started.
if (extraState.equals(TelephonyManager.EXTRA_STATE_OFFHOOK)) {
Intent intentDialog = new Intent(context, CustomDialog.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
context.startActivity(intentDialog);
Intent myIntent = new Intent(context,
RecordService.class);
myIntent.putExtra("commandType",
Constants.STATE_CALL_START);
context.startService(myIntent);
}