1

I instantiate a modal dialog and have a button that executes Capture.captureAudio() On Android 8+ running on Samsung TAB S5e and Galaxy Tab A8 devices, Tapping the button opens the recording dialog as expected, however when tap "Save" we don't get the String that Capture.captureAudio() returns until I dispose the current dialog. Then the Capture.captureAudio() results are returned to me.

Works correctly on IOS and PC.

My Dialog is executed on the EDT, the Capture.captureAudio() is executed from a lambda expression and on a separate EDT

Thoughts?

Regards

Mark Bolduc
  • 165
  • 4

1 Answers1

0

Try showing the Dialog as modless using the showModless() method. Alternatively try using an InteractionDialog as discussed here.

We generally recommend avoiding Dialog for any complex UI especially one that might use the invokeAndBlock semantics. Nesting those can lead to unexpected side effects as you can see in this case. This only happens on iOS since the iOS implementation uses invokeAndBlock() internally

Shai Almog
  • 51,749
  • 5
  • 35
  • 65