Search code examples
windows-phonecodenameone

How to prevent screen lock on Windows Phone


I have a problem with screen lock on windows phone. I tried to use code below but it did't work:

Display.getInstance().setScreenSaverEnabled(false);

Is there any solution for my problem or Codename One simply doesn't support this feature on Windows Phone?

Thanks!


Solution

  • There are some codenameone features that are not supported on Windows phone.

    Check if "Display.getInstance().isScreenSaverDisableSupported();" is returning true.