capacitor-plugin-toggle-fullscreen
Install
Using npm:
npm install --save capacitor-plugin-toggle-fullscreen
or using yarn:
yarn add capacitor-plugin-toggle-fullscreen
Use
Register the plugin in your Activity:
// Other imports...
In JS code:
<button onClick={() => ToggleFullScreen.toggle()}> Toggle Screen</button><button onClick={() => ToggleFullScreen.toggle({ orientation: 'LANDSCAPE' })}> Set Landscape</button><button onClick={() => ToggleFullScreen.toggle({ orientation: 'PORTRAIT' })}> Set Portrait</button>
Run
npx cap sync && npx cap open android