• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Should StageWebView useNative=true work on Windows desktop

Community Beginner ,
Mar 18, 2015 Mar 18, 2015

Copy link to clipboard

Copied

I'm having some issues with StageWebView on a Windows 8 touch-screen desktop computers.  On Windows, our app has been using the WebKit embedded in AIR.  I've pointed the StageWebView to whatsmyuseragent.com, and as expected it shows "Mozilla/5.0 (Windows; U; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) AdobeAIR/16.0".

I am using Flex 4.14.0 and AIR 16.0.

I would like to try using the native/system-default web engine.  The documentation for StageWebView is unclear on whether or not this is supported for Windows.

In the introduction to the documentation, it states:


On desktop computers (in the desktop and extended desktop profiles), the StageWebView class uses the system web control provided by the Flash Player plugin.


But the documentation for the useNative:Boolean parameter for the StageWebView constructor states:

useNative:Boolean (default = false) — When useNative is false, a version of WebKit embedded within AIR is used as the source of the StageWebView created. When useNative is true, then AIR will use the the system's default web engine. Mobile platforms only support using the system web engine, so useNative is ignored on mobile platforms.

This last sentence seems to imply that non-mobile platforms would support useNative.

However, I can't seem to get useNative to work.  I've changed our code to use new StageWebView(true); however, when I point ti to whatsmyuseragent.com, it still shows "Mozilla/5.0 (Windows; U; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) AdobeAIR/16.0".  It doesn't seem to matter what I set my default browser to.

Is there a fix for this?

Thanks

TOPICS
Development

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 19, 2015 Mar 19, 2015

Copy link to clipboard

Copied

LATEST

Take a look at the next sentence after the one you referenced, "The features available and rendering appearance are the same as those of the HTMLLoader class (without the close integration and script bridging between ActionScript and JavaScript provided by an HTMLLoader instance).".

Basically StageWebView used in desktop AIR apps uses the HTMLLoader to render web pages and that is why you are getting the user-agent results that you are seeing. Currently StageWebView is really only meant for mobile AIR apps but if you were to use the same code base for desktop and mobile apps, Adobe made StageWebView friendly to desktops by having it use an HTMLLoader object for rendering HTML content.

The only fix is to wait for Adobe to provide a new means of rendering HTML, which is the topic of discussion How do you use AIR's WebKit/htmlloader?‌, or see if it is possible to create your own Native Extension.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines