feat: local, offline Wi-Fi API for the pinned kiosk app
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 15/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- api, authorization, mobile
調査の方向性
Read ADR-0009 and the agent's kiosk configuration handling around pinPackage and config.apply before anything else. The open questions (naming, authority, the optional consent toggle, and the installer-of-record guard) need a maintainer decision before any code is written. Done means a maintainer has settled those points and a reviewed PR adds the ${applicationId}.localapi provider with its authorization checks.
索引モデルが issue の本文から書いたものです。
説明
Area
Device agent (Android)
The problem
We run a single-app kiosk on fully managed tablets: the MDMesh agent is Device Owner, and our app is pinned (kioskMode single). The tablets sit in people's homes, and the kiosk app has its own Wi-Fi screen. When a household changes its router or Wi-Fi password, the person at the tablet has to join the new network from inside the kiosk.
Since Android 10, only the Device Owner (or the system) can add, enable, disable or remove saved networks, or switch the radio. addNetwork, enableNetwork, disableNetwork, removeNetwork and setWifiEnabled all fail for any other app targeting Q or later. No delegation scope covers Wi-Fi. So under MDMesh the pinned app can't manage Wi-Fi at all.
It also has to work offline. The moment Wi-Fi needs changing is usually the moment the device has no connectivity, so a policy or command from the server can't help. Today the wifi and wifiRadio policies lock the Wi-Fi settings and switch the radio, and the enrollment QR code's Wi-Fi fields only cover first contact. Nothing in the agent adds a network after enrollment.
Proposed solution
A small local API in the agent that works offline, usable only by the app the kiosk is pinned to:
-
Transport: an exported
ContentProviderat${applicationId}.localapi, implementingcall()only. -
Methods:
describewifi.connect {ssid, password, security: open|wep|psk|sae}wifi.savedwifi.forget {ssid}wifi.setAutoJoin {ssid, enabled}wifi.disconnectwifi.setRadio {enabled}
Every reply carries
ok,code,messageandapiVersion. -
Authorization, checked in the agent on every call, offline:
- the agent is Device Owner;
- the persisted kiosk is single-app, and its
pinPackageequalsgetCallingPackage(), which the platform verifies; - the caller's installer of record is the agent.
Anything else gets
UNAUTHORIZEDwith a reason.describealways answers, so the app can tell whether it may use the API. -
Logging: no passwords or SSIDs in logs. The five calls that change something go to the event log as
localApi <method> <code>. -
No protocol change: it's local to the device, so
/agent/v1is untouched (ADR-0009).
If you'd rather have explicit consent than the implicit "pinned app" rule, I'm happy to gate it behind a configuration toggle, say "Let the kiosk app manage Wi-Fi", off by default. That would add one field to config.apply.
We have this implemented on an agent-only branch with unit tests, and ./gradlew detekt assembleDebug lintDebug testDebugUnitTest passes: https://github.com/MDMesh-app/MDMesh/compare/main...nexi-space:MDMesh:feat/local-wifi-bridge. We're testing it on a Lenovo Tab running Android 16 now. We'd much rather stay on main than carry a fork, so if the direction fits, I'll open a PR, split however you prefer.
Open questions for you:
- the naming and the authority;
- whether you want the toggle;
- whether the installer-of-record check is the right extra guard. It also rejects an app that has updated itself through its own
PackageInstallersession, until MDMesh reinstalls it.
Alternatives considered
WifiNetworkSpecifier: the connection is bound to the requesting app's process and lost when it restarts. It isn't a saved network.- Network suggestions: best-effort, need user approval, and can't be removed or listed reliably.
ACTION_WIFI_ADD_NETWORKS: a system "Save network?" dialog, Settings must be allowed in lock task, and the app can't forget a network.- A helper app targeting API 28, for the legacy
addNetworkpath: it relies on a compatibility exception Google could remove. - Pushing Wi-Fi from the server: doesn't help a device that's offline.
- Being our own DPC: what we're moving away from by adopting MDMesh.
Before submitting
- I searched existing issues and discussions for the same idea.
- 主要言語
- Java
- スター
- 44
- フォーク
- 25
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 80
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MDMesh-app/MDMesh のほかの issue
-
enhancement
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
MDMesh-app/MDMesh#252 ·
メンテナーはふだん 2 日以内に返信
-
Change Kiosk Titleオープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
MDMesh-app/MDMesh#253 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
MDMesh-app/MDMesh#232 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 3/5 半日 初心者へのやさしさ 45/100
MDMesh-app/MDMesh#205 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
MDMesh-app/MDMesh#204 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
MDMesh-app/MDMesh の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug devops low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
aphtech/brailleblaster#209 ·
メンテナーはふだん 1 日以内に返信