Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Screen Brightness - after sleep, reverts to the previous setting
-
@omz, this is not a big issue, and your solution probably was meant more as a hack than anything else. But I use the following in pythonista_startup.py
from objc_util import * UIScreen = ObjCClass('UIScreen') screen = UIScreen.mainScreen() screen.setBrightness_(0.2)
It works great. But when my ipad goes to sleep and I re wake it, it goes back to the last manually adusted brightness setting. As I say, it's not a big deal. But you suggested that a long time ago. I think maybe you or someone else now knows a way to set this type of setting/attr to be persistent
-
I think this is a limitation of the API, from Apple's docs:
Brightness changes made by an app remain in effect only while the app is active. The system restores the user-supplied brightness setting at appropriate times when your app is not in the foreground. So if you change the value of this property, you do not need to record the previous value and restore it when your app moves to the background.
I don't think there is a way for an app to make persistent brightness changes.
-
@omz , ok. Thanks. No problems. It still works well for me