Harvenstein
Lurker
I am currently developing part of an application for a student-project. The section I have been assigned is supposed to change the screen brightness according to the value received from the brightness sensor. The code in itself is working perfectly fine, as long as the application has been given permission to alter system settings beforehand.
If started without permission the app will simply close on startup without requesting this permission at all. As far as I have been able to gather from e.g. stackoverflow, the permission needed is one of several `dangerous` permissions, that have their own quirks when it comes to requesting them at runtime.
Does anybody know of a way to accomplish this, or has encountered the same problem as me? If someone could tell me where to look, I would really be grateful.
PS: If needed I will of course provide the sourcecode. But so far this is cluttered enough as it stands.
If started without permission the app will simply close on startup without requesting this permission at all. As far as I have been able to gather from e.g. stackoverflow, the permission needed is one of several `dangerous` permissions, that have their own quirks when it comes to requesting them at runtime.
Does anybody know of a way to accomplish this, or has encountered the same problem as me? If someone could tell me where to look, I would really be grateful.
PS: If needed I will of course provide the sourcecode. But so far this is cluttered enough as it stands.
