Keep screen awake

I need my app keep the screen awake in certain page. I looked in the documentation and get stuck till now. Is there any way to achieve this?

There are no direct settings for this in Fuse, so you’ll need to find how this is achieved in native code (Java and Objective-C), and then wrap that in a Uno class using Foreign code feature.

Ok thank you for giving me a lead. After learned a bit about foreign code from tutorial video on youtube and a thread on the forum , I finally achieve this by writing this single uno code

using Uno;
using Uno.Collections;
using Fuse;
using Fuse.Scripting;

using Uno.Compiler.ExportTargetInterop;

public class ScreenAwake: NativeModule {
  public ScreenAwake() {
    AddMember(new NativeFunction("setKeepAwake", 

  object SetKeepAwake(Context c, object[] args) {
    return null;

  static extern(Android) void SetKeepAwake() 
  @{ rootActivity = @(Activity.Package).@(Activity.Name).GetRootActivity();

    rootActivity.runOnUiThread(new Runnable() {
      public void run() {
        android.view.Window window = @(Activity.Package).@(Activity.Name).GetRootActivity().getWindow();

  static extern(!Android) void SetKeepAwake() {
    debug_log("KeepAwake Not supported in this platform");

Great job, Riva!