Skip to main content
Inspiring
November 15, 2013
Question

Android - StageWebView - Loading PDF Bug - AIR 3.9

  • November 15, 2013
  • 3 replies
  • 2850 views

I think I've discovered another bug in AIR 3.9. Tested on Galaxy S4, and Nexus 7

When using the StageWebView on Android, PDFs will not load correctly. This works correctly on iOS and Desktop.

a Event.Complete event is dispatched, but all you ever see is a white square with Zoom buttons on the bottom right.

Has anyone else ever experienced this?

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

               applicationComplete="init()"

               xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160">   

    <fx:Script>

        <![CDATA[

            import spark.components.Application;

           

            public function init():void{

                this.stage.scaleMode = StageScaleMode.NO_SCALE;

                this.stage.align = StageAlign.TOP_LEFT;

               

                var webView:StageWebView = new StageWebView();

                webView.stage = this.stage;

                webView.viewPort = new Rectangle(50,50,this.stage.stageWidth-100, this.stage.stageHeight-100);

                webView.addEventListener(Event.COMPLETE, this._onLoadComplete);

                webView.loadURL("http://labsdownload.adobe.com/pub/labs/flashruntimes/shared/air4-0_flashplayer12-0_releasenotes.pdf");

            }

            private function _onLoadComplete($event:Event):void{

                trace("COMPLETE");

            }

        ]]>

    </fx:Script>

</s:Application>

This topic has been closed for replies.

3 replies

Inspiring
December 12, 2013

Please everyone vote for this bug: https://bugbase.adobe.com/index.cfm?event=bug&id=3678040 it has 0 votes

Participant
December 12, 2013

I have the same problem. Using Air 3.9 on Flashbuilder 4.7 on a Sasmung Galaxy Tab 3 with Android 4.2.2

On my ios devices everthink works fine. I can load pdf files, ppt, excel and other formats but on anrdoit i get also a white square with Zoom buttons on the bottom right. Anyone a solution? Maybe Adobe can help his customers???

Best Regards.

Participant
November 16, 2013

I have also this problem on GalaxyTab2 10.1, Android 4.0.3, Air 3.9.0.121

Complied with Air3.9, Asc 2.0.0.354071

webView = new StageWebView(true);
webView.stage = this.stage;
webView.viewPort = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);
webView.addEventListener(LocationChangeEvent.LOCATION_CHANGE, _onLocationChange);
// webView.loadURL(new File(new File("app:/pdf/arbo.pdf").nativePath).url);
webView.loadURL("http://www.spacex.com/sites/spacex/files/hyperloop_alpha-20130812.pdf");
// webView.loadURL("http://www.google.com");

11-16 14:31:19.979: I/dalvikvm(23528): Could not find method android.webkit.WebSettings.setAllowUniversalAccessFromFileURLs, referenced from method com.adobe.air.AndroidWebView.11-16 14:31:19.979: W/dalvikvm(23528): VFY: unable to resolve virtual method 635: Landroid/webkit/WebSettings;.setAllowUniversalAccessFromFileURLs (Z)V
11-16 14:31:19.979: D/dalvikvm(23528): VFY: replacing opcode 0x6e at 0x003a
11-16 14:31:20.002: I/webclipboard(23528): clipservice: android.sec.clipboard.ClipboardExManager@418a32f8
11-16 14:31:20.033: D/FirewallPolicy(227): getURLFilterEnabled(true)
11-16 14:31:20.041: D/FirewallPolicy(227): isUrlBlocked - Policy disabled
11-16 14:31:20.041: I/ClipboardServiceEx(227): dismissUIDataDialog. service check
11-16 14:31:20.049: D/WML_SISO(23528): InitPasteboardJni
11-16 14:31:20.119: W/webcore(23528): java.lang.Throwable: EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.
11-16 14:31:20.119: W/webcore(23528):      at android.webkit.WebViewCore$EventHub.removeMessages(WebViewCore.java:2475)
11-16 14:31:20.119: W/webcore(23528):      at android.webkit.WebViewCore$EventHub.access$12600(WebViewCore.java:1217)
11-16 14:31:20.119: W/webcore(23528):      at android.webkit.WebViewCore.removeMessages(WebViewCore.java:2587)
11-16 14:31:20.119: W/webcore(23528):      at android.webkit.WebView.sendOurVisibleRect(WebView.java:3410)
11-16 14:31:20.119: W/webcore(23528):      at android.webkit.ZoomManager.setZoomScale(ZoomManager.java:958)
11-16 14:31:20.119: W/webcore(23528):      at android.webkit.ZoomManager.access$2100(ZoomManager.java:57)
11-16 14:31:20.119: W/webcore(23528):      at android.webkit.ZoomManager$PostScale.run(ZoomManager.java:1428)
11-16 14:31:20.119: W/webcore(23528):      at android.os.Handler.handleCallback(Handler.java:605)
11-16 14:31:20.119: W/webcore(23528):      at android.os.Handler.dispatchMessage(Handler.java:92)
11-16 14:31:20.119: W/webcore(23528):      at android.os.Looper.loop(Looper.java:137)
11-16 14:31:20.119: W/webcore(23528):      at android.app.ActivityThread.main(ActivityThread.java:4514)
11-16 14:31:20.119: W/webcore(23528):      at java.lang.reflect.Method.invokeNative(Native Method)
11-16 14:31:20.119: W/webcore(23528):      at java.lang.reflect.Method.invoke(Method.java:511)
11-16 14:31:20.119: W/webcore(23528):      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
11-16 14:31:20.119: W/webcore(23528):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
11-16 14:31:20.119: W/webcore(23528):      at dalvik.system.NativeStart.main(Native Method)
11-16 14:31:20.190: D/FirewallPolicy(227): getURLFilterEnabled(true)
11-16 14:31:20.190: D/FirewallPolicy(227): isUrlBlocked - Policy disabled