I used
// no dimming NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
to disable the screen timeout for my application. donβt know if you can turn it on and off while the application is running ?!
tested it only on Android ... but should work on iOS too.
source share