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
[Feature]: overlay for preventing termux-app from going to background #3903
Comments
And yes, I tried to create overlay from termux-x11 process, but it seems to be very complicated because of vendor modifications and checks if process if valid. |
i'm the after more test, i found that wakelock is not helping. So it should be the battery optimization option. if (!getSystemService(PowerManager.class).isIgnoringBatteryOptimizations(getPackageName()))
startActivity(new Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS); also i'm not sure if it's a violance to create a nearly invisible overlay view. if so maybe just a command like |
Termux app already requests to disable battery optimizations when enabling wakelock. Wakelock itself should not help with cpu issues while screen is still on, it's meant to disable cpu and network throttling while screen is off, which slows/halts commands from running if phone goes to sleep/doze mode and commands work again at normal speed when screen is awoken again. As for frames dropping.
|
I've tried clicking the wakelock button. it once requests to disable battery optimiazations normally, but now there's no request. maybe I messed up with something. I'll check later. frame dropping: |
Wakelock button will not ask again if battery optimizations have already been disabled earlier.
Its not gonna get killed, it just wouldn't get cpu time to run untill app is in foreground again.
Well, find out, no need to spend time adding overlay in the app if disabling battery optimizations already fixes the issue. |
I did not find such an option on my Samsung devices and Pritom P7 tablet. |
Feature description
When user switches to termux-x11's Activity termux-app goes foreground and its capability to draw frames is limited which causes freezes.
There are a few possible solutions to fix this.
Creating overlay while enabling wakelock should fix all issue. Also I think it will be good to ask to disable battery restrictions when enabling wakelock.
Additional information
A part of conversation in private chat in tg.
twaik:
wasp:
twaik:
wasp:
twaik:
twaik:
wasp:
wasp:
wasp:
twaik:
wasp:
video_2024-03-31_10-13-58.mp4
wasp:
video_2024-03-31_10-14-55.mp4
twaik:
wasp:
wasp:
The text was updated successfully, but these errors were encountered: