Skip to content

feat(kiosk): hotspot and mobile data toggles#13

Merged
AkarinServer merged 5 commits intomainfrom
feat/kiosk-network-toggles
Jan 24, 2026
Merged

feat(kiosk): hotspot and mobile data toggles#13
AkarinServer merged 5 commits intomainfrom
feat/kiosk-network-toggles

Conversation

@AkarinServer
Copy link
Owner

What

Add network controls in Kiosk Settings:

  • Hotspot toggle (best-effort)
  • Mobile data toggle (best-effort)

Notes

  • Hotspot uses Android LocalOnlyHotspot when available; falls back to opening system settings if not supported.
  • Mobile data toggle attempts Settings.Global 'mobile_data'; if blocked by system permission, it opens Internet settings panel.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7c009f91c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 130 to 133
try {
val wifiManager = applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
wifiManager.startLocalOnlyHotspot(
object : WifiManager.LocalOnlyHotspotCallback() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Request location permission before starting hotspot

On Android 6+ startLocalOnlyHotspot() requires the ACCESS_FINE_LOCATION runtime permission (and location services on), but this path doesn’t check/request it before calling the API. On a fresh install where the user hasn’t granted location permission in app settings, this throws/returns failure and the UI fallback only opens tether settings, which won’t grant the app permission. Result: the hotspot toggle will consistently fail until the user manually grants location permission in the app settings.

Useful? React with 👍 / 👎.

@AkarinServer AkarinServer merged commit 5d8d57e into main Jan 24, 2026
1 check passed
@AkarinServer AkarinServer deleted the feat/kiosk-network-toggles branch January 24, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant