Diagnostic is:
admob callback is called on main thread, on it I run:
platform().exec().invokeLater(() -> {
doSomething();
});
AndroidExec.invokeLater basically does:
if (isPaused()) activity.runOnUiThread(action);
else super.invokeLater(action);
in my case (called from admob callback) isPaused() evaluates to TRUE,
yet the Runnable is being called in the main thread!
Activity.runOnUiThread does:
public final void runOnUiThread(Runnable action) {
if (Thread.currentThread() != mUiThread) {
mHandler.post(action);
} else {
action.run();
}
}
I wasn't able to debug into this method since I don't have the sources
or some misconfiguration in Android Studio, however since it's being
ran on the main thread I assume that it evaluates
Thread.currentThread() != mUiThread as FALSE
I'm guessing the problem is that isPaused is evaluated to true
(because the admob view for the video reward ad is on top of the game
view, I assume) and maybe that is causing problems?
El mié., 20 de feb. de 2019 a la(s) 15:47, Andres Q
(
tuls...@gmail.com) escribió: