Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The app is keeping the screen on #335

Closed
4 of 5 tasks
sebbekm opened this issue Apr 13, 2024 · 5 comments
Closed
4 of 5 tasks

[Bug]: The app is keeping the screen on #335

sebbekm opened this issue Apr 13, 2024 · 5 comments
Labels
B: usability bug Something isn't working

Comments

@sebbekm
Copy link

sebbekm commented Apr 13, 2024

Guidelines

  • I have encountered this bug in the latest release of FreeTube.
  • I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • This issue contains only one bug.

Describe the bug

  1. Open Freetube
  2. Swipe to home/switch to another app and leave the phone for as long as your screen timeout is set at. You will notice that the screen does not turn off

Expected Behavior

It should turn off when not watching a video or when using another app.

Issue Labels

usability issue

FreeTube Version

v0.20.0.116

Operating System Version

Android 13

Installation Method

.apk

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

I have tested freetube on three devices and the bug is there on all of them. I have to force close the app, then the screen turns off as intended.

Nightly Build

@sebbekm sebbekm added the bug Something isn't working label Apr 13, 2024
@MarmadileManteater
Copy link
Owner

I have noticed this too, and it bothers me, but I don't know how to fix it at the moment. The wake lock should be being released whenever the app goes into the background.

https://github.com/MarmadileManteater/FreeTubeAndroid/blob/7048a90a2ee0116579ac1cd3e1e2a797ebe80f04/android/app/src/main/java/io/freetubeapp/freetube/MainActivity.kt#L308C1-L316C4

However, it clearly still keeps the screen on when the phone is locked, so I don't know.

@sebbekm
Copy link
Author

sebbekm commented Apr 14, 2024

I have noticed this too, and it bothers me, but I don't know how to fix it at the moment. The wake lock should be being released whenever the app goes into the background.

https://github.com/MarmadileManteater/FreeTubeAndroid/blob/7048a90a2ee0116579ac1cd3e1e2a797ebe80f04/android/app/src/main/java/io/freetubeapp/freetube/MainActivity.kt#L308C1-L316C4

However, it clearly still keeps the screen on when the phone is locked, so I don't know.

That's weird. I hope you find a solution

MarmadileManteater added a commit that referenced this issue Apr 14, 2024
- Remove all references to power manager
- Remove other related unused variables

#335
@MarmadileManteater
Copy link
Owner

MarmadileManteater commented Apr 14, 2024

I just pushed changes which should fix this issue. I used a different method for keeping the screen on which should only work when the app is in the foreground. You can download the nightly here to try it out: https://github.com/MarmadileManteater/FreeTubeAndroid/actions/runs/8680496645

nvm I actually found a problem with it.

MarmadileManteater added a commit that referenced this issue Apr 14, 2024
(this is also relevant to #335)
@MarmadileManteater
Copy link
Owner

Okay, now, it should be fixed in the nightly. (sry abt that 🙈) https://github.com/MarmadileManteater/FreeTubeAndroid/actions/runs/8680564516

@sebbekm
Copy link
Author

sebbekm commented Apr 14, 2024

Okay, now, it should be fixed in the nightly. (sry abt that 🙈) https://github.com/MarmadileManteater/FreeTubeAndroid/actions/runs/8680564516

It's working as intended on the two devices I have on me right now, awesome 👍

MarmadileManteater added a commit that referenced this issue Jul 11, 2024
  ##### APK changes:

 - System UI and navigation UI now match current theme (6f15a5b)
 - Screen no longer stays on when app is in background (#335)

##### PWA changes:

 - PWA should now be installable again (#297)

This release includes all of the changes from upstream release [0.21.1](https://github.com/FreeTubeApp/FreeTube/releases/tag/v0.21.1-beta) as well as [0.21.0](https://github.com/FreeTubeApp/FreeTube/releases/tag/v0.21.0-beta).

  ...

  **Full Changelog**: 0.20.0.116...0.21.1.118
MarmadileManteater added a commit that referenced this issue Jul 11, 2024
  ##### APK changes:

 - System UI and navigation UI now match current theme (6f15a5b)
 - Screen no longer stays on when app is in background (#335)

##### PWA changes:

 - PWA should now be installable again (#297)

This release includes all of the changes from upstream release [0.21.1](https://github.com/FreeTubeApp/FreeTube/releases/tag/v0.21.1-beta) as well as [0.21.0](https://github.com/FreeTubeApp/FreeTube/releases/tag/v0.21.0-beta).

  ...

  **Full Changelog**: 0.20.0.116...0.21.1.118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B: usability bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants