Skip to main content
Azet_Simon
Participant
October 23, 2014
Question

Stagewebview is not using the default browser?

  • October 23, 2014
  • 5 replies
  • 1465 views

Hello community,

We encounter an issue regarding the userAgent we get with Javascript when our page is viewed from an Android App running Air and using the Stagewebview.

We noticed that despite the default browser set as Google Chrome (Webkit v.537), we identify that app using Webkit v.534.

After a lot of trouble shooting, it seems that there is a difference between "native" browser and "default" browser.

Is that correct?

If so, the question is: Is there a way to make Stagewebview use the user selected browser/engine ?

Our website needs to display text vertically (japanese text) and the form elements are not well recognized in the 534 version browser, but work perfectly in the last version of Chrome we can get running on those devices.

(We target Android 4.2+ users)

Any input will be appreciated.

Cedric Simon

This topic has been closed for replies.

5 replies

Inspiring
December 16, 2014

Hi, did you ever get around this problem? I'm facing it right now, a client wants an app for a website we developed (that is basically a webView with 4 buttons for back, forward, and site navigation), which was supposed to be an easy task, but it's giving me a few problems, like this one, for example. The website, when viewed on android appears with a messed up formatting. I don't quite know why, but I suppose it's because of some fancy new responsive CSS 3 styles. Is there really a solution for this, besides having to restructure the whole CSS? I tried adding uses-sdk in the manifest, with a lot of different values, and still no can do.

Azet_Simon
Participant
October 24, 2014

Hello ArkadiuszOkoń,

I downloaded the 4.4W sdk and replaced the file as proposed, but I don't notice any change.

On Desktop, I can see that Air webkit 533 is used. did my compile really took the new file into configuration?

I'm using FlashDevelop, are there settings to change in the bat fie or in the manifest?

As you proposed about the <uses-sdk> settings, some are already setup and I didn' change them, should I higher the minSdkVersion for example?

Here is the current section:

  <android>

    <manifestAdditions><![CDATA[<manifest android:installLocation="auto">

  <uses-sdk android:minSdkVersion="8" />

  <uses-permission android:name="android.permission.INTERNET" />

  <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch" />

</manifest>]]></manifestAdditions>

  </android>

Also, Jan-F-W, thank you for your proposal,

I should explain something else:

The app is using "stagewebviewbridge" package that one can find here : stagewebviewbridge -  Extend Adobe AIR StageWebView ( Desktop, iOS, Android ) - Google Project Hosting

We do not have access to the source code of that app, but we have to investigate the case and propose a solution otherwise the development company in charge will not make a single move.

So I created a sample application that loads a page on my machine and that displays the userAgent to check what engine is running.

(in that case, I can use a StageWebView directly if I want)

I can see that depending on the useNative boolean parameter of StageWebView I get a different userAgent, which is great.

BUT, I had a doubt on mobile, as stated by Adobe Documentation: This parameter is ignored on mobile.

In doubt, I checked on the mobile device, and in both base, the device "native" browser is used, not the Chrome set as "default".

Maybe my tests are not accurate enough? I'm not a flash developer, so I feel a bit lost there.

Thank you for your guidance.

Inspiring
October 23, 2014

When creating a StageWebView, you can pass a Boolean parameter to the constructor.

By default, the parameter is false, making AIR use its inbuild webkit.

If you pass "true", you will make AIR use the system's default web engine. This may solve your problem.

Participant
October 23, 2014

Also you can add to your air manifest in Android section:

<uses-sdk> | Android Developers

Participant
October 23, 2014

I will try to help but it's only a guess:

Try to replace android-res.jar from AIRSDK/lib/android/lib/resources/

with new one from downloaded latest android SDK sdk/platforms/android-XX/android.jar

Maybe it will help? Let me know.