mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
Two permissions decide whether a server on Android lives or dies, and both are invisible until something goes wrong: without POST_NOTIFICATIONS (13+) a foreground service cannot show the notification that is its reason to exist, and without the battery exemption a dozing phone freezes the process - the listener stays in /proc/net and stops accepting, which from the other side of the socket looks exactly like a network fault. The control screen now shows the state of both and asks for whichever is missing, in the order that makes sense: the notification prompt is a dialog of ours, the battery one leaves the app entirely, and coming back from it re-runs the other branch through onResume. A denial is said out loud rather than left to be discovered. The manifest carries the two permissions; the service's own notification was already there.