Question

I am in he middle of makinga custom dialer application. The application needs to dial different phone numbers within 5-10 seconds. The code pretty much looks like this but I need to call multiple numbers from an Array of Numbers. I need to force close a call activity to start another call activity.

private void quickDial(String[] numbers) {

   /*
    * LOOP with CountDownTimer code
    *
   */ 
   Uri number = Uri.parse("tel:" + number[i]);
   Intent dial = new Intent(Intent.ACTION_CALL, number);
   startActivity(dial);

}

Do you have any solution? Thanks :).

Was it helpful?

Solution

you need to use TelephonyManager to listen the phone state change. when detecting the phone call ended, start another dial activity.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top