Capture.captureAudio() within a modal dialog on Android 8+ does not return until dispose of dialog - codenameone

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

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

Related

Material-UI on iPhone: Phantom topClick Events Closing Dialog Element?

I have a Material-UI <Dialog> element that has worked perfectly for a long time, including in Chrome using device emulation. Recently I noticed that for some reason, when using device emulation in Chrome, the dialog opens, and then immediately closes. The same thing is happening with my <Drawer> element. Looking at the call stack, I can see a topClick event is triggering dispatchEvent and is closing the elements -- even though I've clicked nothing except the UI element that opens the Dialog or Drawer.
When I am not using device emulation, everything runs as expected.
The same anomaly is seen when I access the web app from my iPhone. I have updated to the latest versions of all my React plugins, including react-tap-event-plugin, but the anomaly is still here.
What could be causing this?
Thanks very much in advance to all for any info!
Material-UI has dropped its dependency on react-tap-event-plugin. It now uses onClick instead of onTouchTap.

CN1: iOS: Showing ToastBar when virtual keyboard is visible

On iOS (ipad pro) I cannot see the ToastBar showing messages, when the virtual keyboard is visible.
However on Android devices the ToastBar is visible in the same szenario.
Is there way to work around this or do I have to use modal dialogs?
I think I see a problem related to that, it seems we don't handle the special case of iOS VKB's correctly.
I made a fix for this which should be there for the coming update of Codename One this weekend.

Open dialog disappears after screen turns off

When my app has an open dialog e.g. dlg.show(); and the screen turns off by timeout the active and displayed dialog is disappeared after turning on the screen again. I'd like to have the dialog still preset.
Is there a good/recommended way to fix/workaround this behavior?
For a solution, I could imagine one of the following approaches, but could not find further information:
Disabling screen timeout globally for the app.
Disabling screen timeout for dialog specifically.
Using another dialog type (modal, modeless or interaction) that keeps staying.
Maybe there are other ways to fix this?
Use a variable that you store the state of in Preferences. Perhaps a Boolean so when the dialog shows it is true, and if someone exits the app you save it in preferences (you can use exit form action or add something to the lifecycle methods). When the app restarts, get the state from Preferences and display the dialog again if the variable is true.
You could use and integer or string if there are multiple possible dialogs that you might need to show.

Enabling microsoft accessibility for Flex Window hangs application after clicking on identified object

After enabling accessibility for a flex window object, I fired an object.click which brought up a dialog-box. After closing the dialog box, the application went to hung state. So I found the coordinates of object using getrect , restarted both application and silk, kept accessibility disabled clicked on the mainwindow using the coordinates and the problem did not recur. The problem even when I retrieved the coordinates with accessibility and manually clicked on the icon.
I am even unable to fetch locator hierarchy with accessibility enabled when I try to retrieve for objects that are visible only through enabled accessibility. Nothing is captured (blank recorder hierarchy) and the recording stops working any further. I guess the agent goes into some kind of loop or excepts out. Kindly advise.
This was a product issue and got this fixed - not an issue on SilkTest side

WPF Popup getting closed in a seamless citrix mode

First things first, this problem only happens while working in Citrix XenApp seamless mode (which, in simplest of words means the actual app is running on some citrix host but it is simulated as residing in your own desktop). I will take this up with Citrix Support as well but just wanted to poll the group in case someone faced a problem like this before.
I have a WPF app which uses Winforms NotifyIcon to reside in system tray until mouse clicked. In Citrix seamless mode, as user clicks the icon in system tray, the popup flashes and immediately closes on its own.
The Popup window is a vanilla one created with StaysOpen as FALSE and same works in every other environment.
Any suggestions ? This is what I've noticed so far:
The window stays open if I use StaysOpen as true. But then I don't have a way to close the window manually when it loses focus. LostFocus Event doesn't get fired on popup when user clicks outside.
In citrix seamless mode, the MouseEnter event is captured but MouseLeave is NOT so the approach of closing the window if user mouse is outside the window for X secs is not achievable.
Tried the workaround of starting the popup with Staysopen as FALSE and then reset staysopen after like 2 secs so that the pop sticks. It works but a soon as I set StaysOpen as FALSE once the timer is hit, the pop up closes on its own.
Without all these workarounds, if a user quickly clicks (leftclick) on the window before it disappears, the pop up sticks so I tried few ways to simulate the mouse click on the popup as it opens up but that doesn't cut it either.
Thanks
I can't help you with specific advice for tweaking your app to work around the issue, however there is always the hit it very hard with a hammer approach, i.e. tell consumers of your app to disable seamless for your application:
http://support.citrix.com/article/CTX116357/
Update: I pinged the original seamless dev - he said it sounds like a bug where seamless is not correctly routing all the necessary mouse messages between client and server. He said the best way to diagnose this was to run the Spy++ tool on the XenApp server and on the client, and then compare the messages each side sees to identify what messages are not getting translated. Since it sounds like a genuine bug, your best bet is to raise a support ticket with Citrix support and provide them with a sample app that can repro the bug.

Resources