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

Sometimes the widget stops to work #56

Closed
RigacciOrg opened this issue Aug 31, 2021 · 4 comments
Closed

Sometimes the widget stops to work #56

RigacciOrg opened this issue Aug 31, 2021 · 4 comments

Comments

@RigacciOrg
Copy link

RigacciOrg commented Aug 31, 2021

Problem description
After some time of usage the widget suddendly stops working. Pressing the reload icon does not longer show the "Termux shortucts reloaded" toast. Tapping anyone of the items does not start the relevant script. Sometimes the list of items resets itself, displaying the "No files in $HOME/.shortcuts/" .

  • This is not the same of issue [Termux-widget not starting termux  #18], because having an open Termux terminal does not solve the problem.
  • Removing the widget and re-adding it does not solve: the only workaround seems to be a reboot.
  • I have added the permission to drawing over other apps to Termux.
  • I have removed battery optimization from Termux

Steps to reproduce
Boot the phone, normal use for half a day or so.

Expected behavior
Termux-widget works always.

Additional information

  • The phone is running the Rootless Pixel Launcher version 3.9.1 as the home app, installed from F-Droid. The stock Android 11 provides Quickstep instead. Switching the home app from Rootless Pixel Launcher to Quickstep does not revive the widget.

  • The phone is rooted with Magisk Systemless Rooting.

  • Termux application version: Termux-widget 0.12, Termux app 0.117 both from F-Droid

  • Android OS version: 11

  • Device model: Oukitel WP12

@RigacciOrg
Copy link
Author

RigacciOrg commented Sep 9, 2021

It turned out that the problem is caused by the DuraSpeed settings in my phone (Oukitel WP12 with Android 11). That setting is intended to limit the background processes, I suppose to increase battery life and reactivity of foreground app. Unfortunately it causes the Termux Widget to stop working after some time.
DuraSpeed can be configured accessing the Settings menu: I tried to disable DuraSpeed for Termux, Termux:Boot and Rootless Pixel Launcher, but this does not fix the problem. It is not possible to disable DuraSpeed for Termux-widget, because it is not listed as an option.
The only solution that worked for me was to disable DuraSpeed at all.

@agnostic-apollo
Copy link
Member

I have added a launcher icon/activity that can optionally be disabled with 7c7612a. Try version 0.13.0 when its released on F-Droid https://github.com/termux/termux-app#Installation. It may solve the issue.

@RigacciOrg
Copy link
Author

From F-Droid, I upgraded Termux:Widget to version 0.13.0. Now I can enable the DuraSpeed option from phone settings and I can list Termux:Widget as an exception: the problem is solved and everything works as expected. Thanks!

@agnostic-apollo
Copy link
Member

Great, you are welcome.

agnostic-apollo added a commit to termux/termux-tasker that referenced this issue Feb 21, 2022
This allows users to know if they have installed the termux plugin without having to go to android settings app list and should help reduce issues created when users shift termux installation source and get signatures do not match previously installed version errors. This is also required on some phones to allow the user to opt out the app from OEM background killers like DuraSpeed.

Related issue termux/termux-widget#56
agnostic-apollo added a commit to termux/termux-api that referenced this issue Mar 30, 2022
This must not be allowed to be disabled since there is no other way to start Termux:API app again if it crashes multiple times and gets marked as bad process by android. This is also required to bypass OEM battery restrictions like DuraSpeed. This also easily allows users to know if the app is installed or not.

Related issue termux/termux-widget#56
Related issue #447
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants