0

I am new to android and working on conference manager application .I do not know how to access the dial paid after the call is started in android can someone help me in this case or provide some sample codes for my references.Thank you.This is my call() the first number should be a conference number so i used action call and the second number is a conference pin ,every step will have delay in time

private void call(int profileid) {

    ProfileDo profile = adapter.getProfile(profileid);

    int stepCount = 0;
    long previsouStepDelay=0;
    for (StepDO step : profile.getSteps()) {


        String url = "tel:" + step.getValue();
        stepCount++;
        if (stepCount == 1) {
            Intent callIntent = null;
            callIntent = new Intent(Intent.ACTION_CALL, Uri.parse(url));
            startActivity(callIntent);
        } else {
            try {
                Thread.sleep(previsouStepDelay*1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            Intent callIntent = null;
            callIntent = new Intent(Intent.ACTION_DIAL, Uri.parse(url));
            //callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(callIntent);

        }
        previsouStepDelay = step.getDelay();

    }
}

Can anyone tell me what mistake i did and how can i improvise this?

1 Answers1

0

Use below intent to open dialer screen..

Intent intent = new Intent(Intent.ACTION_DIAL);
startActivity(intent); 

reference

Community
  • 1
  • 1
AAnkit
  • 27,299
  • 12
  • 60
  • 71
  • I am having two steps, first step is a phone number and second step number is a dial pad number.How can i do this? – user2656259 Aug 06 '13 at 10:25