Author Topic: Android 7 best settings for battery when off, script to recheck after wake?  (Read 3602 times)

markm75

  • Newbie
  • *
  • Posts: 8
I have had good results with this on my phone for the most part, though there are times during the day on my s7 edge where i find it kept the phone awake for 3 minutes and maybe 16 wakelocks over 30 mins. (this was before i realized my gmail inbox was set to push, i've since changed this)

My phone in general burns about 3-5% per hour when off, though at times i get closer to 1-1.5% depending on time of day and cell signal.  Its those 3%+ times i think that maybe aquamail is contributing. (this again, was when gmail inbox was set to push, i've changed this now)

I have an exchange account with about 5 folders synced (plain folder, 25 messages, 100 cached, actually this was at 50 messages and 200 cached for the example wakelock above, so i've since lowered this as well).. and gmail, about 5 + folders here too, plain sync (i dont think any are set to push).. time frame is set to 30 minutes..

Is there anything more i can do to prevent wakelocks.. i need all these subfolders checked (and i use widgets so i can see if there are new messages in them and quicker access), so reducing them probably isnt an option.

On a given hour in general i get around 10-15 minutes worth of generic wakelocks, most i never could figure out.


On a secondary note.. is there some way to just make aquamail sleep while the phone is off, then maybe via a script app like automateit, have it check for new email the minute the phone is turned back on?

Any thoughts?

Side notes:

Example folders being synced:

Exchange:
Inbox
Sent Items
Drafts
Deleted Items
About 4 other random subfolders

Gmail:
Inbox
Sent Items
Drafts
Deleted Items
About 4-5 other random subfolders

Thanks in advance
« Last Edit: May 16, 2017, 09:20:07 pm by markm75 »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
1 - For IMAP, push mail if you use it is somewhat expensive than scheduled mail checks

2 - For Exchange, please check the account's "options and folders" and try a "N days" for "messages to sync", this takes time to start up (once per folder) but after that is quite efficient.

That's all I have... For Aqua Mail (or any other app), rather than going by "number of wake locks" it may be more useful to go into Phone Settings -> Battery -> details (the exact UI varies from phone to phone) where you see %% values broken down per app -> check what you get for Aqua Mail.
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/

markm75

  • Newbie
  • *
  • Posts: 8
1 - For IMAP, push mail if you use it is somewhat expensive than scheduled mail checks

2 - For Exchange, please check the account's "options and folders" and try a "N days" for "messages to sync", this takes time to start up (once per folder) but after that is quite efficient.

That's all I have... For Aqua Mail (or any other app), rather than going by "number of wake locks" it may be more useful to go into Phone Settings -> Battery -> details (the exact UI varies from phone to phone) where you see %% values broken down per app -> check what you get for Aqua Mail.
Thanks, so your saying what i have for gmail with push being off, is ok, best i can do there..

On the Exchange.. i'm not finding the "messages to sync" option, i mean, i see 25 messages as teh setting.. then messages to cache, at 100.. is this the same?  Not seeing "days"..

mikeone

  • Hero Member
  • *****
  • Posts: 2750
Quote
On the Exchange.. i'm not finding the "messages to sync" option, i mean, i see 25 messages as teh setting.. then messages to cache, at 100.. is this the same?  Not seeing "days"..

In the app's main window (account list view) -> long press on your Exchange account name -> Options and folders -> Account options -> Messages to sync: change to 'By time period' -> choose "N days" (e.g. 14 days)

markm75

  • Newbie
  • *
  • Posts: 8
Quote
On the Exchange.. i'm not finding the "messages to sync" option, i mean, i see 25 messages as teh setting.. then messages to cache, at 100.. is this the same?  Not seeing "days"..

In the app's main window (account list view) -> long press on your Exchange account name -> Options and folders -> Account options -> Messages to sync: change to 'By time period' -> choose "N days" (e.g. 14 days)
Thanks for this.. i would never have thought to do a long press on those :)

Should i also uncheck use  push mail in the main overall settings for each, even though i didnt specify it inside the folders?

StR

  • Hero Member
  • *****
  • Posts: 1558
"Push" in the main overall setting is a "master switch".
There are 3 places where Push can be disabled. Please read the corresponding item in the FAQ:
"How do I enable Push mail?"
http://www.aqua-mail.com/?page_id=227

(And that FAQ contains lots of useful information!)

markm75

  • Newbie
  • *
  • Posts: 8
Does 3min roughly at most, over 45 minutes seem like a long wake lock for aquamail?

I also notice that even though i think i have it set to check mail every 30 min, often there is new mail that doesnt show up till well over an hour later for some reason.

There is also in mail, receiving .. a notification of Android 6+: for more reliable mail checking you may want to allow aquamail to work in the background ignoring battery optimization.. should this be enabled?  This sounds like it would drain the battery more though?

StR

  • Hero Member
  • *****
  • Posts: 1558
There is also in mail, receiving .. a notification of Android 6+: for more reliable mail checking you may want to allow aquamail to work in the background ignoring battery optimization.. should this be enabled?  This sounds like it would drain the battery more though?

That notification is not from Android but from Aquamail, and it is there for a reason.
If you shut down your phone completely, then the battery will last for many days.
If you want Aquamail to check messages as you scheduled, follow the instructions.
You can read more about this in the FAQ item "Persistent network errors or the app not checking mail (any phone, with specifics for Android 6+ Doze Mode, Xiaomi MIUI, Huawei)": http://www.aqua-mail.com/?page_id=227

The fact that you haven't done that is most likely the culprit for your delayed message notification.

The battery optimization is Android's overdue reaction to the overly loose policies allowing multitude of overzealous apps that without any real need run in the background (and many these days want to run on startup - why the hell do you need Google's own YouTube or VLC app running on startup?!). And I am sure that Google's own apps (and the bloatware from the cell-service providers) are already excluded from that "battery optimization".

I am not sure sure about the wake lock time, Kostya would be able to address that issue.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Does 3min roughly at most, over 45 minutes seem like a long wake lock for aquamail?

Does not seem like much, but it depends on a lot of factors - your phone's network connection, the performance of your mail server, how often things change there (so the app has to re-sync), etc.

I'd start by watching the overall %% value showing for Aqua Mail in the phone's Battery settings, where it lists "all things" that consume the battery.

On all my phones, the first few items on that list are usually taken by "screen" and various system things (Android OS, mobile network, etc.)
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/