Android BasicUI questions

Hello everyone! I hope it’s the right place for this discussion.
1.5 years ago on the exhibition i bought Inspinia wall-mounted panel from these guys: . I bought it because they told that it runs Android and i could install my own software if i want to. The time has come and i have successfully hacked it to run OpenHAB app.
Unfortunately it’s sunxi7, with about 768MB of RAM, running old Android 4.2.2. So this turned out very poor with web apps, including HABPanel. However BasicUI in the native Android app, which does not rely on web browser, works like a charm.
So i have some questions and RFEs regarding the app:

  1. In some circumstances, when screen size allows, web version of BasicUI renders items in two columns. Can the app do the same? On my panel it doesn’t.
  2. Is it possible to add a preference to change font size, so that items look bigger?
  3. Would be nice to add fullscreen mode, where it hides systemUI, and have password-protected settings. So that kids and curious guests don’t screw it up.

I’ve moved this to a more appropriate category. I can’t answer 1 or 2 but for three I believe there is a setting to enable full screen mode and keep the screen always on. But I don’t know if the latest version of the app will run on an Android that old. You may be stuck with an old version that lacks those settings.

Thanks, i didn’t see this category before.
Latest version - do you mean the one published as Beta ?

I’ve checked version i’m running and it’s the latest version, 2.6.9 from 15 March. And yes, it does have fullscreen mode switch. Apparently it’s using some newer APIs since this parameter is missing on my panel.

Kind of. If you open a subpage, the app will display two columns:

Not yet:

You can enable fullscreen mode only on Kitkat and above:

Password protection:

1 Like

Thanks for the hint about subpages, it’s even more neat. I like how it works.
BTW, one more RFE: would be nice to specify the home sitemap in preferences instead of querying the server. This would allow me to have different sitemaps optimized for phone and wall tablet.

But you can do that already? If you have multiple sitemaps, you’ll get asked which one to use when connecting to the server for the first time or after having cleared the previous sitemap preference in settings.

I tried to clear the sitemap in settings, it doesn’t ask me, it just loads my default again.
And by this time i’ve got another problem. I added a weather informer web widget from one local forecast provider. The widget comes as CSS + javascript code, so i embedded it in a html page served from “static” directory. It works fine, but the provider insists on having links to itself in the widget; you can’t remove them. And clicking on the informer activates a link to the provider’s web site. The link in the widget has target=_blank, so in normal browser it would open in a new window. But inside the app it just goes to the URL inside the same widget, and it actually breaks the interface and you have to reload it to go back.
I am a developer myself, so i tried to patch the web widget code in the app using method described here: ; but this does not work. onCreateWindow() is never called. I failed to find out what’s wrong so far; perhaps requires digging in the Android source codes
This is not device-specific bug; my quite recent phone with Android 9 behaves in the same way.
I tried also alternate approach with hooking up pointer-events:none CSS property to the link, it works in general, but the property isn’t supported by panel’s webview.
I think in the final case would be good do have a preference in the app, whether to allow opening a browser window or just block it.

I’ve solved the problem with links. I was modifying the wrong code; it turned out that WebViewFragment isn’t used by BasicUI widgets; WidgetAdapter has own code.
Copypastes suck :frowning:
Also i set webview background to transparent; this helps to avoid colored rectangle in the unused space of the widget. Previously i got around by matching html bgcolor with theme background, but this is dependent on a particular theme being used. Now you can set html background to transparent via CSS.
I’d like to contribute; how is this done here? Do you grant me write permissions for the repo or do i fork and publish a pull request ?

Nevermind, i’ve read the contrition guide. :slight_smile: The issue is already there, i’ll get back home in the evening and make a proper pull request.