Invoking a user help

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Invoking a user help

Post by AriSilva »

Hi folks,
I´ve written a set of htm files that can be viewed in windows using any browser (explorer, chrome,etc).
I´ve tried to see this htm help (in fact it is the data entry manual) in a Samsung tablet running Android 4.1.
I´m not an expert in htm, far from that.
I´ve tried the execsystem("html:...), but when executing apparently it sent a bunch of pictures to the Gallery.
The command I´ve used is as follows:

execsystem("html:..\..\30_Apoio\HTM\index.htm");

Is there a way to show this help manual in Android?
By the way, besides the htm files I do have also a pdf file.
Best
Ari
Best
Ari
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Invoking a user help

Post by Gregory Martin »

I would have expected that to work. Try reversing the path slashes to /.

You should be able to open the PDF by using the view: command.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Invoking a user help

Post by josh »

You need to use a full url that starts with file:// followed by an absolute path. A relative path will not work here. Try something like:

execsystem("html:file://" + pathname(application) + "../../30_Apoio/HTM/index.htm");
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: Invoking a user help

Post by AriSilva »

Thanks, Greg and Josh.
The html solution using the application path and reversing the "\" to "/" worked beautifully.
The pdf solution also worked, but in this case the letters were two small in the screen, and the navigation through the document is a little bit awkward. I´m not sure if there is another application that handles better pdf files in android.
Best
Ari
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Invoking a user help

Post by josh »

PDF is really meant for printing so if the PDF was generated for a particular page size like A4 then it will probably be too small on a phone screen. Most PDF viewers let you zoom in but that can be awkward. You could try to recreate your PDF with a smaller page size and see if that helps. HTML/CSS is designed to be able to more easily adapt to different screen sizes so it may be a better solution.
Post Reply