Android AIR htmlLoader alternatives?


#1

Anyone have any suggestions for htmlLoader alternative for AIR on Android?

(htmlLoader would work great, for loading an external webpage and a few clicks around in it – but it is not supported on Android).

Something a little better than StageView bitmaps please.

Thanks

So, as a bit more in the way of specs
I want to be able to open a webpage under the control of the Android app,
let the user click around in the webpage and then close the webpage.
either via a [x] close button I place on the webpage sprite;
or from a separate menu on the Android app.

With the whole mess being within the Android app – not using an external browser.

Again, htmlLoader would be perfect, but it is not
supported on Android.


#2

#3

Thank you.

I’ll take a look at it.


#4

When trying to build this for Android.

Has anyone else had a failure at this step of build-android.bat?

ERROR: The system cannot find the file specified.
platforms\android\app-release.aar

The place where the .bat is trying to pull it from does not have an .aar file there;
and I don’t see this file anywhere in (the rather large) package.

The .bat file copies from various spots prior to that step are fine.

Thanks


#5

You need to run the gradle build first in WebViewANE/native_library/android/WebViewANE/
that should generate the .aar file

see Gradle doc - Assemble the library JAR
and Android doc - Anatomy of an AAR file


#6

You don’t need to build the ANE from scratch. If you do then yes you need to build the Android app in Android Studio.

ANEs are here.
https://github.com/tuarua/WebViewANE/releases/download/1.9.1/WebViewANE.ane?raw=true
https://github.com/tuarua/Android-ANE-Dependencies/blob/master/anes/kotlin/com.tuarua.frekotlin.ane?raw=true

Ensure you also read the wiki


#7

Thank you!

I would of been happy for just the .ANE to start with,
but then I started to get interested in what that build-android.bat was doing
and got bogged down.

:slight_smile:


#8

I think WebViewANE might benefit from some pure AS3 examples.

The only thing that I see in the wiki is this:

var webView:WebViewANE = new WebViewANE();
webView.init(stage, viewPort, "https://www.foo.com", settings);
webView.addToStage();

Which gets me this:

Call to a possibly undefined method addToStage through a reference with static type com.tuarua:WebViewANE.


#9

I’m still looking in the wiki for what settings is to contain.

If I get this running I’ll write the as3 example for the WIKI.


#10

did you check the example files?


#11

Thanks zwetan.

see how the example code doesn’t have the line

webView.addToStage();

that the “quickstart” has?


Just sayin – the docs are pretty choppy for what appears to be the only solution out there for this.


#12

Using the above example
[and thanks for pointing that out]
and the web ANE linked to above, results in:

ArgumentError: Error #3500: The extension context does not have a method with the name init.
at flash.external::ExtensionContext/_call()
at flash.external::ExtensionContext/call()
at com.tuarua::WebViewANE/init()[/Users/eoinlandy/flash/WebViewANE/native_extension/src/com/tuarua/WebViewANE.as:434]


my init call was a copy/paste from the .as sample.



#13

It’s almost funny that people have been asking for an htmlLoader upgrade on Adobe forums since about June 2014, and there are just years of Adobe saying, “we’re gathering user comments on this to decide what to do”.

4+ years of that baloney.


#14

an HTMLLoader is something complicated to build
and as you can see it can also be complicated to use


and you could contribute to it and improve it

always remember that open source is free code that someone else wrote and let you use,
not everything will be perfect


#15

Any thoughts on my issue up 3 comments there, @tuarua ?

I certainly am not here to pick on this ANE.

(I desperately want to get it running).


#16

well… 2 things

first, you’re description of the problem is quite choppy too
second, the best place to report such issues is the issue tracker of the project
here: https://github.com/tuarua/WebViewANE/issues

and now a bit of commenting

I can guarantee you the issue is coming from you
can be anything, maybe you did not pay attention to this or to that,
maybe you missed something, maybe you just lack experience compiling ANE

and it is OK, as a dev it is unlikely someone know everything so a dev is always learning new stuff

but when I see “Any thoughts on my issue up 3 comments there”
I understand a dev that is basically delegating his own issue to someone else

my problem here is that why someone else should take the time to go into the details of something
when you apparently did not took that time?

you don’t say how you compile or with what, from where (which OS?), you don’t say the SDK you use, etc.
how are we supposed from few lines of a stack trace to exactly pointing you at what you’re doing wrong?

I can assume from /Users/eoinlandy/flash/WebViewANE/ that you’re on macOS
have you read https://github.com/tuarua/WebViewANE/wiki/OSX ?
have you read https://github.com/tuarua/WebViewANE/wiki/Troubleshooting---FAQs too ?

what is the source code you try to compile exactly?

if you want answers you gonna have to give details of your setup,
nobody is in your head or in front of your screen


#17

There are example projects supplied for mobile, desktop, flex
in both Flash Builder and IntelliJ.
The quickstart page is an old page I forgot existed and needs to be deleted.

You don’t mention if you are using a Mac or Windows. You earlier mentioned Android, have you read the Android section?

The error you are getting is likely because you haven’t followed the wiki section for Android. You need the frekotlin ANE as well as mentioned in the wiki.

That’s all the information I am willing to provide.