Hello everyone,
I developed a very simple Android app for my own needs to open Gladys, and I’m sharing it in case it might be useful to others.
This is a community project, not official in any way. It is neither developed, validated, nor supported by the Gladys Assistant team. For any questions about the app, it’s here or on the GitHub repository, not on Gladys Plus support
My needs
I mainly use Gladys at home. Using Gladys Plus when I’m on my Wi-Fi works, but it’s slower than the local instance. I wanted:
- to use my local Gladys by default (
http://gladys.lanat my place), so the fastest display possible; - to automatically switch to Gladys Plus when I’m not at home;
- to have nothing to configure afterward.
How it works
- On the first launch, only two questions: do you have a Gladys at home (suggested address:
http://gladys.local, the one from GladysOS; any other address or IP works too)? Are you subscribed to Gladys Plus? If you have neither, the app redirects you to the official Gladys Plus page. - Every time you open it, the last viewed page is displayed immediately while Gladys loads in the background. On Wi-Fi, the app checks in a maximum of 1.5 seconds if your local Gladys responds. If so, it’s the local version; otherwise, Gladys Plus.
- If the network changes while the app is open (you leave or return home), it switches automatically.
- To log in, a banner always indicates what you’re connected to: your local Gladys or Gladys Plus (these are not the same accounts). Right after the first local login, the app offers to also log in to Gladys Plus, once and for all.
- Password managers (1Password, Bitwarden…) work, including on a local Gladys in HTTP, thanks to a small native form.
- The app is in French and English, with the language choice in Android settings.
I tested it on GrapheneOS (Android 17), and it works on any Android 10 or newer.
Installation
With Obtainium, simply add the repository: https://github.com/LM1LC3N7/gladys-android. It installs the APK of the latest version and notifies you of updates. The first signed version will soon be available in the Releases of the repository.
For the curious: security and battery first
From the start, I set two priorities above any feature: not exposing anything and not affecting the battery.
Security and privacy
- No Google Play Services and no libraries: only Android and its system WebView (Vanadium on GrapheneOS). The APK is less than 100 KB.
- Only two permissions: Internet and network status. No location: the Wi-Fi name is never read, the app simply tests if Gladys responds.
- The WebView only opens two addresses: your local Gladys and
plus.gladysassistant.com. Any other link opens in your browser. - Gladys Plus only in HTTPS, with only the system’s certificates: a manually added certificate on the phone does not allow intercepting Gladys Plus.
- The test of the local Gladys (
/api/v1/ping) does not follow redirects, to never confuse a hotel Wi-Fi portal with your Gladys. - Sessions excluded from Android backups, no statistics sent by the WebView. The credentials entered in the native form are never saved.
- Open-source code (Apache-2.0): everything is verifiable.
Battery
- Nothing runs when the app is closed: no background service, no scheduled task, no periodic check. The network is only observed when the app is on screen.
- In the background, the Gladys page is paused, timers included.
- When returning to the app, the Gladys interface checks and restores its connection before sending any command: turning on a lamp right after returning works.
Known limitations
- The local version must be at the root (
http://host[:port]). - If the home Wi-Fi has no Internet access, Android may stay on mobile data, and the app then uses Gladys Plus.
gladys.localuses mDNS: if your network does not resolve it, use the IP.
The code, documentation, and issue tracking are here: GitHub - LM1LC3N7/gladys-android: Simple android web view for local access to Gladys and automatic fallback to Gladys plus, with aggressive cache for a better user experience · GitHub
Your feedback is welcome. The icon features the Gladys logo with a small « home » badge, to avoid confusing it with the official web application.