feat(kiosk): hotspot and mobile data toggles#13
Conversation
There was a problem hiding this comment.
💡 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".
| try { | ||
| val wifiManager = applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager | ||
| wifiManager.startLocalOnlyHotspot( | ||
| object : WifiManager.LocalOnlyHotspotCallback() { |
There was a problem hiding this comment.
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 👍 / 👎.
What
Add network controls in Kiosk Settings:
Notes