For the complete documentation index, see llms.txt. This page is also available as Markdown.

Screen Control API

Manage screen behavior using the WebToNative JavaScript API. Control screen orientation, brightness, and wake settings for your mobile app.

You'll need to import the javascript file in your website before starting from this link.

To Keep device screen on all the time.

const { screen } = window.WTN

//to keep device screen on all the time
screen.keepScreenOn()

//to revert back to normal screen behaviour
screen.keepScreenNormal()

 
import { keepScreenOn, keepScreenNormal } from "webtonative/Screen"

//to keep device screen on all the time
keepScreenOn()

//to revert back to normal screen behaviour
keepScreenNormal()

 

Last updated