airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
198 stars 11 forks source link

Android 34: Stagewebview inactive after coming back to foreground #3351

Open marcanw opened 1 month ago

marcanw commented 1 month ago

Hello,

I am currently testing my app on Android 34 to ensure compliance with the upcoming Google deadline at the end of August. I have encountered an issue where setting targetSdkVersion="34" renders the StageWebView unusable after switching back to the app.

Using Chrome inspect, I observed that the WebView remains inactive after the first switch to background/foreground.

Steps to Reproduce

Build on Animate/Windows with AIR 51.0.1.4. Tested on Samsung Galaxy A14 Android 14.0 (34)

I created a simple project with just a Stagewebview:

        var webView:StageWebView = new StageWebView();
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    webView.stage = stage;
    onresize();
    stage.addEventListener(flash.events.Event.RESIZE, onresize);
    webView.loadURL("https://www.google.com/");
    function onresize(e:* = null)
    {
        webView.viewPort = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);
    }

After launching the app, switch to background/foreground, then try to use the keyboard.

Here is the test project with 2 apk (test33 that works fine and test34 which has the problem). two logs and the projet. webviewbug34.zip

Known Workarounds

Build with targetSdkVersion="33"

I hope this will be fixed asap so I can continue to test my app for the google deadline.

Thank you in advance for your help!

ajwfrost commented 1 month ago

Thanks - interestingly this is an error in a completely unrelated part of code, which is then impacting the StageWebView from getting resumed after a pause. We need to have try/catch handlers when we're calling into other listeners (plus we will also fix the other listener which had been throwing an exception on Android 14..)

marcanw commented 1 month ago

So I guess it will be fixed shortly then ;-)

ajwfrost commented 1 month ago

Yes and we're planning a quick patch release for this and #3353 - so just an Android-only update (and probably only released via the AIR SDK Manager..)