capacitor-community / photoviewer

⚡ Capacitor plugin to view table images with fullscreen and sharing capabilities.
MIT License
52 stars 25 forks source link

This plugin keeps my entire app awake #55

Closed DupuyNicolas closed 9 months ago

DupuyNicolas commented 10 months ago

Describe the bug When adding this plugin to my capacitor application, my app is kept awake and phone screen never goes off when the app is in foreground, on Android. This is because of this line : https://github.com/capacitor-community/photoviewer/blob/859bede939e1dd535b9b5fd1e1c737876ae704ea/android/src/main/res/layout/bridge_layout_main.xml#L7 But i'm not sure why it's affecting my entire application event when i'm not on the page using photoviewer. Is it the same Android activity ?

To Reproduce Steps to reproduce the behavior: Just install the plugin, open the app on Android, and screen never goes off.

Expected behavior I would like to be able to configure this keepScreenOn parameter, or at least that it only affects my app when the photo is displayed.

Smartphone (please complete the following information):

jepiqueau commented 9 months ago

@DupuyNicolas this has been fixed in 3.0.6