From 165847da1ca3c3be627b5968bc77e9a11b3385cb Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 17 Oct 2026 13:29:25 +0200 Subject: feat(android): ask for the local network when a group opens Android 17 makes it a permission for an application targeting SDK 37. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/src/meshbay_hub/static/platform.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/platform.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/platform.js b/packages/meshbay-hub/src/meshbay_hub/static/platform.js index 3a91417d..d773200f 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/platform.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/platform.js @@ -92,6 +92,20 @@ export const capabilities = { tray: Boolean(bridge && bridge.capabilities && bridge.capabilities.tray), }; +/** + * Android 17's permission to reach the local network, in the Android + * application (shell/LocalNetwork.kt): `state()` is "granted", "prompt" while + * Android will still ask, or "denied" once only the settings can change it. + * Absent in a browser, which holds that permission itself and where a page + * cannot ask for it, and on the desktop, where there is no such permission. + */ +export const localNetwork = { + available: Boolean(bridge && bridge.localNetwork), + state() { return bridge.localNetwork.state(); }, + request() { return bridge.localNetwork.request(); }, + openSettings() { return bridge.localNetwork.openSettings(); }, +}; + /** * The app's secret store, as far as the page may know it. * -- cgit v1.2.3