Android App (org.openhab.habdroid) home screen launcher / kiosk mode?

I have the android app (org.openhab.habdroid) installed on tablets around my house.

Is there a way to set it as the device launcher / kiosk mode. With HabpanelViewer I used (adb shell cmd package set-home-activity de.vier_bier.habpanelviewer/.StartActivity) as a launcher. I don’t care so much for the security of a kiosk but it would be nice to have android tablets booting into it as the launcher. Is this possible?

Typically this is less on the app and more on the os. That said the app can have the feature added (at the expense of more permissions). There are many apps also that can put the phone into kiosk mode or single app mode. The problem as you stated will be having openhab going to the page you want. I havent looked at the code much but one option if the app supports it would be deeplinking. With this you could use something external to open the app to a specific part.

What android os version are you using and are you against another app aiding in the process?

Hey @mediatech15 - I’m running this on a bunch of Lineage / formerly Amazon Fire tablets running Android 8.1. Currently flashing them and then setting them up using this script. Having them launch the Android app at boot time is the last missing piece.

One hacky solution would be to have the OpenHAB adb binding tell each tablet to launch the application every few minutes. But there has to be a nicer way.

So to do what you want I personally have always used a Device management system. Meraki (Cisco) has a great one and now is free

This allows you to provision and configure settings, profiles, single app mode, and all remotely and then deploy and manage those devices. I have used it in corp settings and is amazing.

Though after further review this appears to no longer be free. I have a grandfathered account. So depending on a cost requirement that could be a problem. Though it is the non-hacky fully supported way to do all you want without root and without any weirdness

If cost is not an issue but that cost is another that I have used is

Which is 2.50 a month per device. If only have handful that is less that a domain cost per year.

Let me know if you still would like to persue the totally free way. I can do some testing on my end with some of my devices.

My goal is less in locking down the tablet, more in booting into the app. But I guess what you are saying is that I could do something like single-app-mode and that would just boot into the OpenHAB app. I’ll look into that now.

So I looking into single-app-mode with adb shell dpm set-device-owner org.openhab.habdroid/.ui.Main and following along in Florent Dupont: Android Shell command DPM : Device Policy Manager

For this to work the app would need to include an Admin Receiver event.

Why not just continue using HabPanelViewer? You can set it to point to MainUI as the default page.

HPV has been great and I’ve used it for many years. But I also have an ongoing issue where it doesn’t reliably load my screen (clicking on the side menu and out again then finally loads the main screen). That coupled with it being discontinued had me looking at alternatives.

Ideally I just want an app that is:
a) fullscreen webview
b) able to be set as a launcher
c) can read a URL from a file.

I looked around at running Chrome/Firefox in some kind of webview mode but wasn’t able to find a way to set them as a launcher.

Not quite discontinued so much as no longer supported by the original developer. Someone could pick it up in the future, though I’m admittedly not waiting on that.

I’d probably just go with FullyKioskBrowser. Alternatively, you could use Tasker or another automation to launch Chrome/Firefox instead of needing a launcher.

With Add ability to set app as launcher by mueller-ma · Pull Request #2941 · openhab/openhab-android · GitHub you can set the openHAB app as launcher, so it’s opened after launch and when the home button is pressed.
I recommend to combine it with the fullscreen mode and disabled screen timeout.

1 Like

You rock, @mueller-ma. I had no idea it would be that easy to do.

the openhab app is ok, but unfortunately i couldn’t find a way to start with a page other than the overview page

@mueller-ma thanks for adding as a launcher. That’s a great step!

One question to other’s running this on tablets: how do you keep your WiFi alive on newer versions of Android? My wall mounted tablets are plugged in and I have a rule using androiddebugbridge binding to turn on the screen when motion in the room is detected. But that can never complete if the tablet’s wifi is down and ADB cannot reach the tablet. Is there a trick to get Android to never sleep? Best I’ve found is writing a wake-lock at boot time (

IMO the Wifi shouldn’t be turned off at all when the display is on. The openHAB app has an option to keep the screen on. Did you try that?

I’ll try to keep the screen on. Currently I use the KNX motion sensor in each room to then turn on the screen via the AndroidDebugBridge (in network debug mode). But that depends on wifi being on first.

I saw an update in the android app, thats now able to setup openHab as a launcher, i also see the setting, but when i enable it as a test on my phone, it doesnt change the launcher

how can i configure this?

I answered here: Android Launcher, how to? With the new version released on 12/10/2022 - #2 by mueller-ma