HTMLdialog freezing on CSEntry 7.7.3, Android 11

Discussions about creating CAPI applications to run on Android devices
Post Reply
tomc
Posts: 1
Joined: October 13th, 2022, 9:45 am

HTMLdialog freezing on CSEntry 7.7.3, Android 11

Post by tomc »

Hi all,

I'm having a problem with htmldialogs on CSEntry 7.7.3 on Android 11 devices (tested on two different devices). I started with a much more complex html document, but have pared it back to the following in the hopes that it would be a problem with something in the larger document:

Code: Select all

<!doctype html>
<html lang="en">
    <head>
        <!-- Required meta tags -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, minimum-scale=1, user-scalable=no">
	<title>Test</title>
    </head>
    <div>
        <p>Test test test test this is a test for HTML dialog</p>
    </div>
    <button onclick="CSPro.returnData('1')">Submit</button>
</html>
I have tried calling this both from the pre- and postproc and in a few different contexts (assigning it to a string, in an errmsg, giving it some dummy input data, etc) and nothing works. When the htmldialog("test.html") is called, the forward and backward buttons in CSEntry are greyed out, the case tree does not respond, and the Android back button does nothing. To recover, I have to close CSEntry.

Has anyone encountered this before and do you have any suggestions on how to proceed?
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: HTMLdialog freezing on CSEntry 7.7.3, Android 11

Post by Gregory Martin »

Do you need to display this as a dialog? If so, somewhere in your code you'll need to set the size of the dialog. Something like:

Code: Select all

CSPro.setDisplayOptions(
    JSON.stringify(
        {
            width: CSPro.getMaxDisplayWidth(),
            height: CSPro.getMaxDisplayHeight()
        }
    )
);
If it doesn't need to be a dialog, consider just showing the file with the view function: https://www.csprousers.org/help/CSPro/v ... ction.html
Post Reply