Author Topic: Best battery strategy?  (Read 4503 times)

mma8x

  • Newbie
  • *
  • Posts: 3
Best battery strategy?
« on: November 25, 2015, 11:21:17 am »
Trying to connect to an outlook account which gets a lot of traffic (50-100 emails/day). Typically, my battery drain is 0.5-0.8%/hour when idle. Noticed that in push mode, I was using 3-4%/hour. I tried only syncing inbox, 15 messages, no difference. Then tried polling on a 3 hour schedule. This cut it down somewhat, but remained at about 2.5%/hour. Still getting aquamail wakelocks, even though I don't think I should be.
Ideally, I'd like to have a push notification that only runs when the screen is on. I don't need instant notification, and I want no resource use when the phone is idle. What's the best way to do that?
Thought about setting up a tasker profile to enable aqua syncing with screen on--is that possible, and would that be the best solution, or is there a better way through settings?

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Best battery strategy?
« Reply #1 on: November 25, 2015, 09:10:36 pm »
Re: Still getting aquamail wakelocks, even though I don't think I should be

Wakelocks.

Sorry, I just don't know how to make an app do something in the background without those evil, evil wakelocks.

I'm sure there are mail apps out there which use so called "negative wakelocks" -- and so they *charge* the battery while running! Don't know they do that, though.

</joking>

Oh, and yes, IMAP push is somewhat expensive on the battery:

http://twitpic.com/1psxnb

Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

mma8x

  • Newbie
  • *
  • Posts: 3
Re: Best battery strategy?
« Reply #2 on: November 26, 2015, 10:26:26 pm »
I think that it was clear that I don't want it running in the background, so there should be no wakelocks. Sorry, but a 3-4 % hit is too much. The question was what would be the most battery efficient way to check email only when the screen is on.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Best battery strategy?
« Reply #3 on: November 27, 2015, 06:09:16 pm »
No, it wasn't clear at all -- if you don't want it running in the background, why did you enable push mail?

If you only want to check mail yourself using refresh buttons (or "pull to refresh"), then please turn off "scheduled mail sync" and "IMAP push" in app settings -> mail, receiving.

And maybe enable "check mail on events" on that same screen (scroll down to see the relevant section).
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

mikeone

  • Hero Member
  • *****
  • Posts: 2762
Re: Best battery strategy?
« Reply #4 on: November 27, 2015, 08:28:30 pm »
-> mail, receiving.

And maybe enable "check mail on events" on that same screen (scroll down to see the relevant section).

The event type "The app resuming" could be suitable here.
« Last Edit: November 27, 2015, 08:32:15 pm by mikeone »

mma8x

  • Newbie
  • *
  • Posts: 3
Re: Best battery strategy?
« Reply #5 on: November 28, 2015, 03:00:09 am »
Guess I should have said I don't *need* it running in the background. I didn't realize the push would be so battery intensive. Is that because it's using imap instead of active sync? It would be nice if one of the events was screen on. That's what I was considering tasker for. Maybe screen on as the event, and enable sync for a minute or something.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Best battery strategy?
« Reply #6 on: November 29, 2015, 01:07:57 am »
Yes, IMAP push is expensive -- but it doesn't have to be prohibitively expensive.

It depends a lot on how many messages you're asking the app to sync (keep fresh) per folder, this setting is called "messages to sync" and the default is 25 or 50.

A lot depends on the server too -- some are not configured well, and may wake up the device every minute (I'm not joking).

Re: ActiveSync -- no, ActiveSync and IMAP are not alternatives to each (ActiveSync and EWS are).

Re: sync after screen is enabled -- triggering on this event is unreliable, Android only sends it to actually running apps, which runs counter to what you're trying to do.

What I would recommend is:

-- Checking the account's "messages to sync" setting (long press the account -> options and folders -> account options)

-- If it's really large (over 100, or over 250 or so) this could be the main reason for the battery burn

and then you could try reducing it and trying push again

OR

-- How about just letting the app check mail on its usual schedule, which is every 15 minutes, or maybe changing it to every 10 or so

AND MAYBE

-- Combined with "app resuming" sync-on-event
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/