StageWebView on android jellybean loading local html

Hi,
I'm having trouble loading local html files into a local loaded html wrapper using ajax.
this only happens in JellyBean, iOs and pre-JB is okay. i tracked it down to JB using stricter cross domain policies.
see this stackOverflow thread. http://stackoverflow.com/questions/14560453/loading-local-html-with-load
Could AIR please expose the following property on the webview: setAllowUniversalAccessFromFileURLs(true);
Or if anybody has a workarround, that would be great!
Tom

Hi Tom,
I am experiencing the same problems. Because of this, our team is still using AIR 3.5.
Somebody just opened a bug report. You should probably follow it closely: https://bugbase.adobe.com/index.cfm?event=bug&id=3610032
Greets
kelvin

Similar Messages

  • UIwebview load local html file problem

    Hi,
    load local html file into UIwebview the TD cell data can't display, as attached the "2817 MODEL" column data lost on screen:
    The local html file souce as:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html lang="en">
      <head>
        <title>IBM z196 zEnterprise 2817 Mainframe Reference - Technology News</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <meta http-equiv="Content-Style-Type" content="text/css">
        <meta name="robots" content="index,follow">
        <meta name="Author" content="Hesh Wiener">
        <meta name="Formatter" content="Heshomatic 6.2">
    <STYLE TYPE="text/css">
    <!--
    BODY
      font-family: Arial, Helvetica, sans-serif;
      font-size: 9pt;
    A:link{color:white}
    A:visited{color:yellow}
    -->
    </STYLE>
      </head>
      <body>
        <h2>
          IBM Mainframes:<br>
           IBM z196 zEnterprise 2817 Mainframe Reference
        </h2>
        <table border="1" style="border-collapse:collapse;" summary="2094 series economic specs">
          <tr>
            <th rowspan="2">
                2817  <br>
                 MODEL  
            </th>
            <th rowspan="2">
              FIRST<br>
               AVAIL
            </th>
            <th rowspan="2">EST  INIT<br>
            US PRICE  </th>
          <th rowspan="2"> EST INIT <br>
          MIN US MAINT</th>
            <th rowspan="2">
              APPROX MIPS
            </th>
            <th rowspan="2">
              SW PRICE<br>
               MSU
            </th>
            <th>
              LSPR RELATIVE PERFORMANCE
            </th>
          </tr>
          <tr>
            <th>
              MI z/OS 1.11
            </th>
          </tr>
      <tr>
        <td>2817-401</td>
        <td>3Q 10</td>
        <td>$975,000</td>
        <td>$6,280</td>
        <td>240</td>
        <td>30</td>
        <td>0.43</td>
      </tr>
      <tr>
        <td>2817-402</td>
        <td>3Q 10</td>
        <td>$1,187,000</td>
        <td>$6,729</td>
        <td>459</td>
        <td>58</td>
        <td>0.82</td>
      </tr>
      <tr>
        <td>2817-501</td>
        <td>3Q 10</td>
        <td>$1,244,000</td>
        <td>$7,524</td>
        <td>588</td>
        <td>74</td>
        <td>1.05</td>
      </tr>
      <tr>
        <td>2817-403</td>
        <td>3Q 10</td>
        <td>$1,385,000</td>
        <td>$8,346</td>
        <td>672</td>
        <td>85</td>
        <td>1.20</td>
      </tr>
      <tr>
        <td>2817-601</td>
        <td>3Q 10</td>
        <td>$1,423,000</td>
        <td>$9,434</td>
        <td>768</td>
        <td>97</td>
        <td>1.37</td>
      </tr>
      <tr>
        <td>2817-404</td>
        <td>3Q 10</td>
        <td>$1,570,000</td>
        <td>$10,665</td>
        <td>879</td>
        <td>110</td>
        <td>1.57</td>
      </tr>
      <tr>
        <td>2817-405</td>
        <td>3Q 10</td>
    </html>
    Please help. thanks
    Regards,
    HC

    add colspan into td tag and try it got same problem, I just discovered the td data is numeric it can't display, change td data to alphanumeric it workable to normal display.
    below td tag data is unworkable:
    <td>2817-401</td>
    <td>2817401</td>
    change to below is workable:
    <td>2817*401</td>
    <td>281740A</td>
    <td>2817-401A</td>

  • How to load local html-file into webBrowser tool? [SDK 6.5]

    The webbroser tool lets you load an external html by inputting the adress in its "Url"-property.
    But how do you load a local html-file that is added to your project? Lets say the path is: Folder1/Subfolder1/Webpage1.html. What would I put in the Url-property to make this work?
    While on this subject, what is the support for css and javascript when using locally loaded webpages in the webbrowser?

    Thanks for the answer Malleswar, but I have now played around with all variations of that code-line that I can think of, but still I can not locate the html-file that is located within the project. Since Im planning to distribute the html-files with the executable (as one file) it should read it directly from wherever the application is installed.
    The html-file is included within the project. Solution Explorer -> Solution 'myProject' -> myProject -> Webpage1.html
    Which is (as usual) also where the Form1.cs (which contains the webBrowser-component) is located.
    Any ideas of how the Uri should be constructed in this case?
    Thanks,
    Daniel

  • FF 10: cannot load local html files by dragging to FF; links in email don't open

    Just upgraded to FF 10. I cannot open a local html file by dragging it to to FF, or by clicking the file name. Clicking the file name brings up an error message: There was a problem sending the command to the program. Dragging just shows a circle with a slash.
    I can open a local file by typing "file///<file location>" in the location bar.
    Also, clicking a link in an email to any site does not open the site.

    Hi,
    Please see [http://kb.mozillazine.org/Windows_error_opening_Internet_shortcut_or_local_HTML_file_-_Firefox this]. You can start Firefox in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode] to check if an add-on is causing the problem. You can also try to '''Open with''' by right-clicking on the HTML file and choose Firefox and enable '''Always use the selected program to open this kind of file'''.

  • StageWebView for Local HTML file

    I simply cannot get this to work.  I see a lot of people offering advice on the web for how to implement it, I've been trying all day and it doesn't work with Adobe AIR 2.5 for Android Flash CS5 plug-in.
    Instead of linking to an external website:
         webView.loadURL(http://www.google.com);
    I want to use StageWebView (because of the nice scroll capability) to load a local html file.  I have tried EVERYTHING, and it doesn't work.
    I have included the file in the APK (tried as a subdirectory and eventually, to simplify testing, I just included it in the same directory so no complex path).
    I have tried what others had recommended:
        webView.loadURL("test.html");
    I have tried using the filesystem and resolving the path:
        import flash.filesystem.File; 
        var file:File = File.applicationDirectory.resolvePath("test.html") ;
        webView.loadURL(file.nativePath) ;
    I have tried numerous change-ups on the filesystem approach, including:
        var file:File = new File("app:/test.html");
    and
        webView.loadURL(file.url);
    NONE OF THESE THINGS WORK.  Can anyone help me?  I'd like to have scrollable content, included inside the Android app - like a license html file or others.
    If none of this will work, any suggestions on creating simple, scrollable content that looks nice (scroll pane, scroll list, anything?)

    Hi Joe,
    can you show code snippet for the 1st solution? With loadString you can't load anything else into that page (i..e stylesheet)
    Edit: soon after I've posted this question I have found a solution:)
    var resultsPageUrl:String = File.applicationDirectory.resolvePath("output-html/result_html_pattern.html").nativePath;
    //and later
    webView.loadURL(resultsPageUrl);
    Edit2: above was just enough to have it working in adl still no joy
    Here is an example of temporary file being loaded, this works, http://forums.adobe.com/message/3443946
    var source:File = File.applicationDirectory.resolvePath("output-html");//copy entire folder (with css)
    var destination:File = File.applicationStorageDirectory;
    source.copyTo(destination, true);//copy to the application storage
    //get path to the html page within copied folder
    var resultsPageUrl:String = "file://" + destination.resolvePath("result_html_pattern.html").nativePath;
    best regards

  • A working method to load local PDF and HTML files on iOS

    I had a lot of trouble getting this to work, and I'm hoping this post saves someone time. Some of the information that's been posted in other locations is either wrong, incomplete, or might only work on Android. By the time you read this message the information here may no longer be accurate, so here's the testing environment:
    Window 7
    Flash CS 5.5.0
    AIR 2.7.0.19530, which was compiled on June 28, 2011
    iPad 1, version 4.3.5 of iOS
    Let's get started.
    On iOS, you load external PDF and HTML files using the StageWebView class.
    On Windows, StageWebView works but the HTMLLoader class is a better choice if you're creating a desktop app.
    You can also load HTML files by reading in the file's text. The information in this post is only for loading external HTML files.
    StageWebView will not load a file that's in File.applicationDirectory. All files bundled in your app are placed in File.applicationDirectory, which means you'll have to copy any external file you wish to load with StageWebView to another directory.
    So where can you copy your file? File.applicationStorageDirectory won't work. File.documentsDirectory does work.
    Several people have recommended copying to a temporary file using File.createTempFile(). This works, but there's a catch: it seems that, like Windows, StageWebView relies on a file's extension when determining how to load it. When you create a temporary file on iOS using File.createTempFile(), the file will have no extension (and on Windows, File.createTempFile() creates a file with the extension .tmp, which is equally problematic).
    The solution to the file extension problem is to rename the temporary file by appending the original file's extension. AIR currently does not have a <file>.rename() function, so you'll have to do it using <tempFile>.moveTo().
    Here's some code I've successfully tested several times on both iOS and Windows. The file is copied to the temp directory. The file's extension is restored by just slapping the original file name to the end of the temp file.
            private function loadExternalFile():void
                var webView = new StageWebView();
                webView.stage = this.stage;
                webView.viewPort = new Rectangle( 0, 0, 1024, 555 );
                // Works with either html or pdf files.
                // These are stored in the root of the application directory.
                var fileName:String = "euei.pdf";
                //var fileName:String = "euei.htm";
                var sourceFile = File.applicationDirectory.resolvePath( fileName );
                var workingFile = File.createTempFile();
                try
                    sourceFile.copyTo( workingFile, true );
                    // You have to rename the temp file
                    var renamedTempFile:File = workingFile.resolvePath(workingFile.nativePath + fileName);
                    workingFile.moveTo(renamedTempFile, true);
                    webView.loadURL( renamedTempFile.url );
                catch (err:Error) { }

    I tried this with Flash CS5.5 and AIR 4.0 SDK. Any pdf loaded simply fills the viewPort with black. Also tested with a png version of the pdf and that displayed just fine.
    What's the purpose of copying to a temp work file? I found that webView.loadURL( sourceFile.url ); gave me the exact same results.
    Any ideas?
    Thanks!

  • StageWebView In Android, HTML input file not work~!

    StageWebView in ios, HTML input file work fine,
    But in Android, It Click don't alert ImagePicker.
    I test in browser,HTML is work,
    so i think,StageWebView In Android don't Achieve WebChromClient.openFileChooser?
    My Android System version is 4.2.1,
    ADOBE AIR version is 16.0.
    Please help me, Thanks~!

    Could you please open a new bug report on this at http://bugbase.adobe.com?  When adding the bug, please include a small sample project so we can quickly reproduce the issue.  Once added, let me know the bug number and I'll follow up internally.
    Thanks,
    Chris

  • StageWebView to local HTML???

    StageWebView to local HTML file
    It is possible to work locally Ipad?
    I appreciate all the help

    Thank you for your feedback, Sinious.
    Unfortunately not know the correct implementation solution is to try.
    You have some implementation related to that need?
    I look forward to returning.
    Thankful.

  • Local html file path setting

    Hi,
    I tried to use StageWebView to load a local index.htm which is saved in "src/assets" folder for Flex 4.5 mobile.
    I've tried different path settings but all failed. Please help, thanks!
    protected var webView:StageWebView = new StageWebView();
    protected function onViewActivate(event:ViewNavigatorEvent):void
      webView.stage = stage;
      webView.viewPort = new Rectangle(20, 100, 450, 450);
      webView.addEventListener(LocationChangeEvent.LOCATION_CHANGE,onURLChange);
      // StageWebView can't load the html file.
      // webView.loadURL("file://assets/index.htm"); 
      // webView.loadURL("assets/index.htm");  
      addEventListener(ViewNavigatorEvent.REMOVING,onRemove);

    That's quite alright. These forums are one of the best places to start learning!
    Unfortunately, Acrobat doesn't offer much flexibility when it comes to saving the data file produced when you export/submit data from the form. While you can't preset the path, you do have a little bit of control over the data file name which should, by default, be the same as the name you gave to the file containing the form (XDP/PDF). The catch is that if your form is loaded via a browser, it'll first get saved to a temporary folder and temporary file name. When the user exports the data and the XML data file is created, it'll have the temporary file name as its default file name (which will be bunch of letters and numbers, e.g. "FSA1U483.xml").
    I think you would be best to let Acrobat's UI take care of letting the user specify the folder and file name.
    Stefan
    Adobe Systems

  • Firefox on Android Jellybean 4.2.2 is soooo slow?

    I am a long time user of Firefox on my PC. Could not do without it anymore :)
    So ofcourse I did install it right away when I got my Samsung Galaxy Tab 3 WiFi with Android Jellybean 4.2.2.
    And it is like a total other world: it is sooooo slow. It takes such a long time before the pages are even loading. It's like FF is first figuring out what it has to do with the URL:
    "Eh? What do I have to do now? Wait, wait, don't tell me, I know it! Ehr ... what does he mean? What was it again? I know I have to do something now but what was it again? Oh, he wants me to go to that URL! I think? Yes, I am sure now that I have to go to that URL."
    And then the page is loading. The actual loading of the page is just fine, no slowness there.
    I did try all kind of things mentioned here at the forum (clearing cache, moving cache to another place, uninstall FF and install FF fresh again, and so on) but nothing helps. And no add ons installed at all.
    I also did try it with and without syncing with my desktop FF but no result.
    The native Chrome browser is lightning fast in comparison to FF.

    I am using Firefox Android 28.0.1.
    And thanx for the link, will try it.
    Have to say though: did a lot of searching here in the forum, on Google and so on. And what strikes me is that there are rather a lot of comments/complaints stating that FF was fast but since a few months ago it became slower. Could not track the precise date or FF version but it looks like this started around 4 months ago?

  • Button not working in Chrome Android Jellybean

    The button code works fine on iPad 2/safari but is not functioning  on Android JellyBean tablet Nexus 7/chrome. What could be the problem?
    html
    <a class="btn-red" href="case-study-1.html"><span><span>Case Studies</span></span></a>
    css
    .btn-red {
        border: 1px solid #8c0d0f;
        -webkit-border-radius: 3px;
                border-radius: 3px;
      -webkit-box-shadow: 1px 1px 4px 1px #000;
              box-shadow: 1px 1px 4px 1px #000;
      background-color: #c23d45;
      background-image: -webkit-gradient(linear, left top, left bottom, from(#c23d45), to(#8c0d0f));
      background-image: -webkit-linear-gradient(top, #c23d45, #8c0d0f);
      background-image:    -moz-linear-gradient(top, #c23d45, #8c0d0f);
      background-image:      -o-linear-gradient(top, #c23d45, #8c0d0f);
      background-image:         linear-gradient(to bottom, #c23d45, #8c0d0f);
        padding: 8px 12px;
        background-clip: padding-box;
        color: #fff;
        font-style: italic;
        font-family : Georgia, Times, "Times New Roman", serif !important;
        .btn-red:hover {
            text-decoration: none;
            color: #fff;
        .btm-nav .btn-red {
            display: inline-block;
            margin: 0 .5%;
            height: 90%;
            width: 18%;
            .btm-nav .btn-red > span {
                display: table;
                height: 100%;
                width: 100%;
                .btm-nav .btn-red > span > span {
                    display: table-cell;
                    vertical-align: middle;

    Try this in a new test.html page.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Button Test</title>
    <style>
    body {width: 500px; margin: 45px auto;}
    .btn-red a:link{
        margin:45px;
        -webkit-border-radius: 3px;
        border-radius: 3px;
        -webkit-box-shadow: 1px 1px 4px 1px #000;
        box-shadow: 1px 1px 4px 1px #000;
        background-color: #c23d45;
        background-image: -webkit-gradient(linear, left top, left bottom, from(#c23d45), to(#8c0d0f));
        background-image: -webkit-linear-gradient(top, #c23d45, #8c0d0f);
        background-image: -moz-linear-gradient(top, #c23d45, #8c0d0f);
        background-image: -o-linear-gradient(top, #c23d45, #8c0d0f);
        background-image: linear-gradient(to bottom, #c23d45, #8c0d0f);
        padding: 8px 12px;
        color: #fff;
        font-style: italic;
        font-family : Georgia, Times, "Times New Roman", serif;
    .btn-red a:visited {color:#FFF}
    .btn-red a:hover,
    .but-red a:active,
    .but-red a:focus {
        text-decoration: none;
        color: #000;
    </style>
    </head>
    <body>
    <div class="btn-red">
    <a href="http://example.com">Example</a>
    <a href="http://google.com">Google</a>
    </div>
    </body>
    </html>
    Tested on Android 4.1 (Jelly Bean) and it works.
    Nancy O.

  • Loading local sound into UIWebView?

    I'm able to successfully load a local html-file into a UIWebView, and from that load a local image via the html-code.
    Loading a local sound-file from the UIWebView, however, is a different matter.
    Does anybody know why the code below only manages to display a local image but no local sound, and what the solution would be?
    (you can find the code here sinc this forum does not enable showing code unformatted in any way that I know of):
    http://forums.macrumors.com/showthread.php?p=6730846&posted=1#post6730846

    mTheBackgroundPath = [[NSBundle mainBundle] pathForResource:@"black_background" ofType:@"jpg"];
    mTheBackgroundPath = [ mTheBackgroundPath stringByReplacingOccurrencesOfString:@"/" withString:@"//"];
    mTheBackgroundPath = [ mTheBackgroundPath stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
    mTheBackgroundPath = [@"file://" stringByAppendingString:mTheBackgroundPath];
    Then I just used that path in the background="" tag in the body of the html.

  • Opening local .html files on iPad

    I have created a personal homepage that I have loaded on my Macs at home. Any way I can use this file on my iPad 3?

    It is possible to open local HTML files in Safari on iPad2. Easy!
    Open your Safari.
    Touch Bookmark icon for a little while.
    A dialogue box appears with "/var/Mobile" title.
    Go to "Applications" > your app (iFile, GoodReade or whatever yours) > Documents.
    And you are there. Open your HTML files.
    Now you can go anywhere to and fro without problem.
    It is FTP:///.
    If need later, Bookmark that.
    With Loving-Kindness!
    bhikkhusirin

  • Loading local content using AJAX in AIR

    Hello All,
    I've got a techinical question regarding loading local html5/Css/JS files into AIR's HTMLComponent. I'm very much aware that Safari's webkit implementation can handle this effectively and AIR's Webkit Implementation boasts about having nearly the same implementation as Safari's, but there still is a sanbox violation when trying to load files locally with AIR using AJAX from the HTML component. Is there a work around for this?
    One of the original ideas behind AIR was to lower the security violations between web applications and local files to make them feel more desktop-like so it really doesnt make sense if a component used to display webpages contain such restrictions.
    Any form of help or advice would be very much appreciated

    You don't want to use FileReference in AIR for what you are
    doing. Check the documentation for the mx.controls.FileSystemTree.
    There are actually a handful of AIR-specific controls for accessing
    the file system. There isn't a "File Open" dialog per se; you can
    build your own out of the controls given. I will say that the
    controls will have the flavor of the OS (so on a Mac the controls
    will behave similarly to the way a Mac accessses and browses for
    files).

  • HTMLLoader loading local content (SWF files) problem

    Hello guys,
    I'm just finishing my application but I facing a problem.
    I'm currently developing a desktop application using AIR.
    I'm using HTMLLoader to load local SWF files when te user tries to access specific content on the application.
    I successfully accomplished this, but the loaded SWF also loads other files (assets and xml files with translations) and that is not working.
    When a SWF is loaded he just stops on his own loading screen (when loading the XML files).
    All this stuff is happening on my CustomNativeWindow:
    (my CustomNativeWindow "overlays" the main application)
    public function CustomNativeWindow()
             var nativeWindowInitOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
             nativeWindowInitOptions.systemChrome = NativeWindowSystemChrome.NONE;
             nativeWindowInitOptions.renderMode = NativeWindowRenderMode.DIRECT;
             nativeWindowInitOptions.resizable = false;
             nativeWindowInitOptions.maximizable = false;
             nativeWindowInitOptions.minimizable = false;
             super(nativeWindowInitOptions);
             alwaysInFront = true;
             this.activate();
    public function setProperties(contentName:String, contentURL:String, posX:Number, posY:Number, stageWidth:Number, stageHeight:Number):void
              this.stageHeight = stageHeight;
              this.stageWidth = stageWidth;
              this.contentURL = contentURL;
              this.contentName = contentName;
              this.x = posX;
              this.y = posY;
              this.width = stageWidth;
              this.height = stageHeight;
              this.title = contentName;
              this.addEventListener(Event.RESIZE, onWindowResize);
              SWFHTMLLoader();
    private function SWFHTMLLoader():void
              //REQUEST LOAD URL
              var request:URLRequest = new URLRequest(contentURL);
              //HTML LOADER SWF
              htmlLoader  = new HTMLLoader();
              htmlLoader.width = stageWidth;
              htmlLoader.height = stageHeight;
              htmlLoader.addEventListener(Event.COMPLETE, onHtmlLoaderComplete);
              htmlLoader.load(request);
              stage.addChild(htmlLoader);
    private function onHtmlLoaderComplete(e:Event):void
              trace("NATIVE WINDOW HTMLLoader complete");
              onWindowResize();
    private function onWindowResize(e:Event = null):void
              if (htmlLoader)
                        htmlLoader.width = stage.stageWidth;
                        htmlLoader.height = stage.stageHeight;
    Probably something related to security?
    How can I fix this?
    Is kinda urgente... deadline is coming...
    Thank you!

    Thank you kglad for your fast response...
    The reference to the content comes from a XML loaded on the main application.
    var xml:XML =      <Content  en="game" >
                                      <ImageSource>assets/images/gallery/resources/gameone.png</ImageSource>
                                      <ContentSource>content/gameone/gameone.swf</ContentSource>
                                </Content>;
    contentURL = xml.ContentSource;
    So contentURL is: content/gameone/gameone.swf
    Am I in trouble?

Maybe you are looking for