Page 1 of 2

Polybios in android

Posted: Fri Jun 15, 2018 9:55 pm
by sashapont
Is it work on android?

If I write @REQUIRE "polybios"
App is not start :(
Plugin for armeabi-v7a
Android 4.0.4

Re: Polybios in android

Posted: Sat Jun 16, 2018 10:14 pm
by airsoftsoftwair
Please post LogCat output of what Hollywood says when it tries to load the plugin.

Re: Polybios in android

Posted: Sun Jun 17, 2018 12:23 am
by sashapont
How I can do it on android?
When I try to start applet I only see black screen.

Re: Polybios in android

Posted: Sun Jun 17, 2018 12:22 pm
by airsoftsoftwair
1. Connect your Android device to your PC
2. Start LogCat from a console like this: "adb logcat"
3. Start Hollywood on the Android device
4. Watch the LogCat output. Hollywood will log something like this:

Code: Select all

Hollywood 7.1 [Android] [64-bit] (c) by Andreas Falkenhahn
The Cross-Platform Multimedia Application Layer
 
Loading plugin polybios.hwp...
Preparing display...done
And Action!
Post this output here. Actually, I only need what it says in the "Loading plugin polybios.hwp" line. It should log an error.

Re: Polybios in android

Posted: Mon Jun 18, 2018 4:48 pm
by sashapont
I/LogTag (27369): Loading plugin polybios.hwp...
I/LogTag (27369): failed
I/LogTag (27369): (Reason: Cannot load plugin: Cannot load library: reloc_library[1285]: 2037 cannot locate 'rand'...
I/LogTag (27369): )

Re: Polybios in android

Posted: Fri Jun 22, 2018 3:23 pm
by airsoftsoftwair
Ok, looks like Polybios requires at least Android 5.0. I forgot to mention this in the documentation. Unfortunately, supporting earlier Android versions isn't possible because they miss some functions required by Polybios.

Re: Polybios in android

Posted: Fri Jun 22, 2018 9:34 pm
by sashapont
it is very sad :(
How I can check android version and preload Polybios if they>5?

Re: Polybios in android

Posted: Fri Jun 22, 2018 10:50 pm
by airsoftsoftwair
You can just load Polybios with LoadPlugin() and if that fails you know you have Android < 5 :-)

Re: Polybios in android

Posted: Sat Jun 23, 2018 2:25 pm
by jPV
BTW. I just came up with a problem when I try to use LoadPlugin instead of @REQUIRE on MorphOS.

If I do:

Code: Select all

LoadPlugin("polybios")
doc = pdf.CreateDocument()
doc:SetCompressionMode(#HPDF_COMP_ALL)     
I get an error: Constant not found!

So it doesn't recognize the #HPDF_COMP_ALL constant when I've loaded the plugin with the LoadPlugin function, but it does work if I change LoadPlugin to @REQUIRE.... what's wrong here? I'd like to load the plugin only if needed in this case...

Re: Polybios in android

Posted: Sun Jun 24, 2018 12:38 pm
by airsoftsoftwair
jPV wrote: Sat Jun 23, 2018 2:25 pm BTW. I just came up with a problem when I try to use LoadPlugin instead of @REQUIRE on MorphOS.

If I do:

Code: Select all

LoadPlugin("polybios")
doc = pdf.CreateDocument()
doc:SetCompressionMode(#HPDF_COMP_ALL)     
I get an error: Constant not found!

So it doesn't recognize the #HPDF_COMP_ALL constant when I've loaded the plugin with the LoadPlugin function, but it does work if I change LoadPlugin to @REQUIRE.... what's wrong here? I'd like to load the plugin only if needed in this case...
Well, constants are evaluated at preprocessor level and at that time #HPDF_COMP_ALL obviously isn't there because the plugin is loaded at runtime. So using constants made available by plugins can be a little tricky, but the following should work:

Code: Select all

doc:SetCompressionMode(GetConstant("#HPDF_COMP_ALL"))