capacitor-community / photoviewer

PhotoViewer table images with fullscreen and sharing capabilities
MIT License
49 stars 12 forks source link

Bug: Display timeout disabled with plugin installed (Android) #43

Closed dave-morgan closed 6 months ago

dave-morgan commented 1 year ago

Describe the bug Installing the plugin and running a capacitor app stops the screen from timing out. Works fine in IOS. Bug in Android.

To Reproduce Steps to reproduce the behavior:

  1. npm install the plugin and setup
  2. set android display timeout to 15secs
  3. Open app

Expected behavior The display timeout should occur at 15 sec inactivity and screen dims to black.

Screenshots N/A

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Doesn't require the user to import in JS. Just installing the plugin create the bug. Sample repo: https://github.com/dave-morgan/cap-photoviewer-bug

jepiqueau commented 9 months ago

@dave-morgan Can you share a repro simple app that i understand the issue. What is the purpose of android display timeout? and how and where you set it up?

dave-morgan commented 9 months ago

Sample repo: https://github.com/dave-morgan/cap-photoviewer-bug

The app is the standard ionic start - blank template with android and photoviewer plugin.

Display timeout, i am referred to "sleep" / "screen timeout". In android settings you set a time where the screen turns off for a period of inactivity.

The same project without this plugin will have the screen turn off after the time in the phone settings. Added photoviewer without even calling from JS will stop this from occurring.

jepiqueau commented 6 months ago

@dave-morgan Fixed in 3.0.6