diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/platform.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/platform.js | 14 |
1 files changed, 14 insertions, 0 deletions
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 @@ -93,6 +93,20 @@ export const capabilities = { }; /** + * 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. * * The store is the main process's (the OS keychain through safeStorage) and it |