capacitor-community/photoviewer

Bug: Display timeout disabled with plugin installed (Android)

Closed this issue · 3 comments

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):

  • OS: Android
  • Browser: chrome
  • Version: 33

Smartphone (please complete the following information):

  • Device: Pixel 6 & API 33 emulator
  • OS: Android 13
  • Browser: Capacitor app
  • Version latest

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

@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?

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.

@dave-morgan Fixed in 3.0.6