Polybios in android

Discuss PDF file handling with the Polybios plugin here
sashapont
Posts: 152
Joined: Thu Aug 03, 2017 2:49 pm

Polybios in android

Post by sashapont »

Is it work on android?

If I write @REQUIRE "polybios"
App is not start :(
Plugin for armeabi-v7a
Android 4.0.4
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Polybios in android

Post by airsoftsoftwair »

Please post LogCat output of what Hollywood says when it tries to load the plugin.
sashapont
Posts: 152
Joined: Thu Aug 03, 2017 2:49 pm

Re: Polybios in android

Post by sashapont »

How I can do it on android?
When I try to start applet I only see black screen.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Polybios in android

Post 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.
sashapont
Posts: 152
Joined: Thu Aug 03, 2017 2:49 pm

Re: Polybios in android

Post 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): )
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Polybios in android

Post 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.
sashapont
Posts: 152
Joined: Thu Aug 03, 2017 2:49 pm

Re: Polybios in android

Post by sashapont »

it is very sad :(
How I can check android version and preload Polybios if they>5?
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Polybios in android

Post by airsoftsoftwair »

You can just load Polybios with LoadPlugin() and if that fails you know you have Android < 5 :-)
User avatar
jPV
Posts: 600
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Polybios in android

Post 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...
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Polybios in android

Post 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"))
Post Reply