From: Po Lu Date: Sat, 18 Nov 2023 09:41:51 +0000 (+0800) Subject: Document Battery Optimization challenges on Android X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6aa70c236f8e0ca3ba18d94b706791b16ff6587b;p=emacs.git Document Battery Optimization challenges on Android * etc/PROBLEMS (Runtime problems specific to Android): Mention battery optimization, the way it impacts background execution, and how it might be disabled. --- diff --git a/etc/PROBLEMS b/etc/PROBLEMS index ebecf50d26b..72a6639c978 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -3567,6 +3567,27 @@ port is a large undertaking that we are looking for volunteers to perform. If you are interested in taking responsibility for this task, please contact . +** Emacs can only execute spasmodically in the background. + +Recent Android releases impose "battery optimization" on programs for +which it is not expressly disabled; such optimization inhibits the +execution of background services outside brief windows of time +distributed at intervals of several dozens of minutes. Such programs +as ERC which must send "keep-alive" packets at a rate beyond that at +which these windows arrive consequently lose, yielding connection +timeouts after Emacs has been in the background long enough that +battery optimization enters into effect. + +This optimization can be disabled through the Settings app: navigate +to "Apps & notifications", "Emacs", "Battery", "Battery Optimization", +before clicking the drop-down menu labeled "Not Optimized", selecting +the option "All Apps", scrolling to "Emacs", clicking on its entry and +selecting "Don't Optimize" in the dialog box thus displayed. + +The organization of the Settings app might disagree with that +illustrated above, which if true you should consult the documentation +or any search mechanism for it. + * Build-time problems ** Configuration