Invoking a user help

Discussions about creating CAPI applications to run on Android devices
AriSilva
Posts: 110
Joined: July 22nd, 2016, 3:55 pm

Invoking a user help

Postby AriSilva » March 9th, 2018, 3:30 pm

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: 956
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Invoking a user help

Postby Gregory Martin » March 11th, 2018, 4:55 pm

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: 1448
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Invoking a user help

Postby josh » March 12th, 2018, 7:45 am

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: 110
Joined: July 22nd, 2016, 3:55 pm

Re: Invoking a user help

Postby AriSilva » March 14th, 2018, 12:36 pm

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: 1448
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Invoking a user help

Postby josh » March 14th, 2018, 12:42 pm

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.


Return to “Android”