cordova-plugin-inappbrowser icon indicating copy to clipboard operation
cordova-plugin-inappbrowser copied to clipboard

New android only flag to keep screen on

Open ravicini opened this issue 3 years ago • 0 comments

Platforms affected

Android

Motivation and Context

We have a scenario where we show a page to the user with the in app browser and like to keep the screen on during that page. The in app browser helps us got achieve an illusion that the screen is a part of the app.

@Hermarcel wrote a different scenario in the issue linked below. Closes #876

Description

I've added a in app browser option flag to keep the screen on. New flag: keepscreenon Default: not enabled Sets Android window flag: WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)

Testing

I've performed the changes in our app first and tested it on a device.

  • Set Screen timeout to 15s
  • Navigating to the page -> screen keeps on
  • Navigating back to the app -> flag gets cleared -> screen timeout works again

Checklist

  • [x] I've run the tests to see all new and existing tests pass
  • [x] I added automated test coverage as appropriate for this change
  • [x] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • [x] I've updated the documentation if necessary

ravicini avatar Sep 01 '21 08:09 ravicini