Some users are reporting that our Android app doesn’t respond to to user input (touch) events after launching. After minutes the app suddenly starts responding or the other way to unfreeze the app is by switching to another app and back. The UI itself responds to events from the network, so the UI itself is not frozen.
Unfortunately I’m unable to reproduce myself and the problems seems to be specific to certain devices.
I don’t get any crash reports or anything, logs don’t reveal anything so I’m in the dark as to what is going on.
Do you have the situation where the modal JUCE Freeware license subwindow is popping up somewhere (maybe its not visible but is popping up), and UI events are therefore going to it before it disappears and are only then despatched to the main window?
Nope. Sorry, I meant in the virtual method for your main component, see if parentHierarchyChanged() of your main window is being called during initialization time, and if so - is there toFront(), and if not, why not?.
This would be a clue: the main window is not in focus - parentHierarchyChanged() should happen at least once to put your main component in focus.
So manually toFront() it in your constructor for Android or find out why in your particular case the window stack is not propagating toFront() events through this method …
Perhaps a ‘hidden’ Android text window has the carat (cursor) associated with it. I’m not positive but I’ve seen something like this before where an Android TextField was used as a ‘hidden event trap’ for catching full IME-enabled input events (i.e. unicode results are provided for international key combinations) but was not displayed, visibly, in a way that it was obvious the key events were being trapped -i.e. the field is rendered off-screen or at the bottom of the window stack.
So, maybe check for that? The reason I think this is happening is because you mentioned that it all resolves if the app focus goes to another app and then comes back again - this would imply when the re-focus of the app occurs, its not on a hidden ‘IME input event trap TextField’, but rather your main App window …