Call from Android app followed by button press

Question:

The problem is this: I'm calling from an android application, as usual

Intent call = new Intent(Intent.ACTION_CALL, Uri.parse("tel:3211234")); startActivity(call);

The call is answered by an office PBX robot, which says that you need to press buttons (such as "You got through to the District Military Commissariat. If you want to serve in the army, press the star, if you do not want to serve in the army, press the pound key.")

How do I click the star from my app?

Thanks in advance.

Answer:

Try like this

Intent call = new Intent(Intent.ACTION_CALL, 
Uri.parse("tel:3211234"+PhoneNumberUtils.PAUSE+"#"));
//или вместо PhoneNumberUtils.PAUSE - PhoneNumberUtils.WAIT
Scroll to Top