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

Battery drainage #997

Open
valsu opened this issue Feb 27, 2022 · 4 comments
Open

Battery drainage #997

valsu opened this issue Feb 27, 2022 · 4 comments
Labels
question Further information is requested

Comments

@valsu
Copy link

valsu commented Feb 27, 2022

On my Android phone aTox is using a lot of battery even when "idle". Recently aTox accounted for 60% of the battery drain, even when the phone is supposed to be in sleepmode.

@robinlinden
Copy link
Collaborator

Hi!

Yeah, that's sadly how the Tox protocol works right now. In order to be online so your contacts can see you, you have to continuously send and receive packets, so your phone is never able to go into deep sleep.
I'm experimenting a bit with different solutions, but right now it's unavoidable (and expected.) :(

What do you think of something like #485? That would allow you to stay online when you're presumably around your house, and aTox would automatically go to sleep when you're out and about and not likely near a charger?

@robinlinden robinlinden added the question Further information is requested label Feb 28, 2022
@valsu
Copy link
Author

valsu commented Mar 1, 2022

What do you think of something like #485? That would allow you to stay online when you're presumably around your house, and aTox would automatically go to sleep when you're out and about and not likely near a charger?

I think that would be an option worth adding. Another idea would be to add a setting for intervals the client actually goes online.

@robinlinden
Copy link
Collaborator

Yeah, that's also a neat idea. Opened an issue to track it in case someone wants to work on it before I get to it. :P

@gustavo-nramires
Copy link
Contributor

Maybe the client and servers could coordinate meeting intervals, say a few seconds every few minutes. 5 seconds every 5 minutes should be 5/300 ~= 1.7% of the original battery usage!

Idea: Maybe the client should wake up every X minutes, and wait for the sender to send a status message, saying if there are any incoming messages, and whether he is still alive; if he sends nothing, sleep back after a timeout -- in that case perhaps the client could send a message, to make sure the sender didn't lose clock sync or reset his device, and if there's not reply they can be declared offline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants