Can termux not run in background?

i need to monitor cell status 2g/3g/4g and send it to another device I am using termux-telephone for that and http request for sending it off I have noticed termux-telephone stops working after I have switched over to another app, the script is still running but it won't retrieve the required data any idea why
20 Replies
Catinette
Catinette3mo ago
might be an android restriction or you have battery settings on for termux phantom process and all
Catinette
Catinette3mo ago
Don’t kill my app!
Don’t kill my app!
Hey Android vendors, don’t kill my app!
dr.doom5771
dr.doom5771OP3mo ago
if it was a battery setting the loop/http server would have stopped
Catinette
Catinette3mo ago
be sure of that
dr.doom5771
dr.doom5771OP3mo ago
yes
Catinette
Catinette3mo ago
and if it's not that, well, might just be android restriction maybe it asks for data too often too fast
dr.doom5771
dr.doom5771OP3mo ago
but apps like Tasker and automate are able to fetch this information even in background
Catinette
Catinette3mo ago
weird maybe someone with more info could help more
dr.doom5771
dr.doom5771OP3mo ago
maybe they have to get some kind of approval from playstore may be it's same for termux-clipboard-get it will only get it when the screen in active
Catinette
Catinette3mo ago
no idea, might be cause of termux-telephone itself oh did you try termux wake lock?
Catinette
Catinette3mo ago
No description
Catinette
Catinette3mo ago
acquire wake lock
dr.doom5771
dr.doom5771OP3mo ago
yes I do have this notification active
Catinette
Catinette3mo ago
no not the notification
dr.doom5771
dr.doom5771OP3mo ago
ok
Catinette
Catinette3mo ago
tap on acquire wakelock and try again
dr.doom5771
dr.doom5771OP3mo ago
got it
Catinette
Catinette3mo ago
if it works it will use more battery tho, cause your phone wont go into sleep mode im pretty sure tasker and automate can get wakelock too, so it might just be cause of that
dr.doom5771
dr.doom5771OP3mo ago
No description
dr.doom5771
dr.doom5771OP3mo ago
still didn't worked just made a small script that detects if there is a change in clipboard and echo it every 2 seconds "Clipboard" and "method:arg]" were copied while the app was open and "dogs" and "average" were copied when the app was not in focus the 3rd one didn't showed
Want results from more Discord servers?
Add your server