There’s a JUCE level call you can make that will solve this on iOS. It’s nice in that you don’t need to do the whole .mm/.h file, etc. However, this method will NOT work for Android. I might need to try benediktsailer’s version of the Android solution to get the same result.
// Prevent the screen for entering screen saver mode
//
Desktop::setScreenSaverEnabled(false);
