1

私は会議マネージャーアプリケーションに取り組んでいます。私は電話をかけるために ACTION_CALL 関数を使用し、番号をダイヤルするために ACTION_DIAL を使用しています。

プライベート void コール (int プロファイル ID) {

    ProfileDo profile = adapter.getProfile(profileid);

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

        String url = "tel:" + step.getValue();
        stepCount++;
        if (stepCount == 1) {

            callIntent = new Intent(Intent.ACTION_CALL, Uri.parse(url));
            startActivity(callIntent);

        } else {
            try {
                Thread.sleep(previousStepDelay * 1000);
                System.out.println("hai");

            } catch (InterruptedException e) {
                e.printStackTrace();
            }

            callIntent = new Intent(Intent.ACTION_DIAL, Uri.parse(url));

            startActivity(callIntent);

        }
        previousStepDelay = step.getDelay();

    }
}

}

4

0 に答える 0