AquaMail Forum

English - Android => Development builds => Topic started by: Kostya Vasilyev on August 26, 2016, 12:54:54 am

Title: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Kostya Vasilyev on August 26, 2016, 12:54:54 am
https://www.aqua-mail.com/download/AquaMail-market-1.6.4-dev1.3.apk

In Google Play as "beta" version.

В Google Play как "бета" версия.



Copying the list of changes so I can link from Google Play (beta):

Exchange mail:

- When you bring up "other folders" or "move to folder", the list of folders is now synced incrementally, only changes since last time. Faster, lower battery and traffic usage.

( "options and folders" -> "folders", aka "manage folders" still does a full sync, in case there are any issues with incremental sync )

- Exchange accounts now support a date-range-based "messages to sync", e.g. "last 10 days" or "last 30 days", etc.

The default for new Exchange accounts is now "sync last 14 days".

This sync algorithm is incremental too. May take some time for the initial sync (just how Exchange is...) but after that it will only get changes since last time. Faster sync, lower battery and traffic usage.

- If you use the old "sync N most recent messages", the app is now able to quickly detect, per folder, when there are no changes since last time. Faster, lower battery and traffic usage.

- Push mail for Exchange.

Requires Google Play Services (Google Cloud Messaging).

In Pro version only.

Uses a "cloud server", does not compromise on privacy, let's call it "cloud assisted" not "cloud based".

The "cloud" has no technical capability to access your emails, does not know your account's password or the account's email identity, not even temporarily.

The only information that "passes through" this "cloud server" and then Google's servers is made of abstract identifiers, like this:

Quote
Folder e5ad981e09408394ae18363147c6ea7a5b664997 just had a change

It belongs to AquaMail on device ab9fcfa3e001c73f2c1d118bb1daa597e64bffec

Whose Google identifier is:

cmSMMz3InWA:APA91bFRy_XTSWvqSMctWF70LAPDtR8BYZ0gjjG6YPvJdbaOAcNxntGqvYuSB9E90tCKkyzk9EaoOMZp5JSCjbh1NcclWEKMz6NGV8fMz-7Ktz7huxKOcq19QrYrRjcfcbsPnU9wO7V3

This is broadly the same approach as used in Signal messenger by Whisper Systems:

http://support.whispersystems.org/hc/en-us/articles/213190817-Why-do-I-need-Google-Play-installed-to-use-Signal-

IMAP:

- A few changes / fixes / improvements (hopefully) to push mail too, esp. on Android 6.0+.

- The "Push mail on Wifi only" setting has been moved from app settings to per-account "options and folders" -> "account options".

Translations:

- There is aboout a dozen new items. Let's wait a little for the dust to settle just in case there are more UI changes.



Копирую заново чтобы сделать ссылку из Google Play (беты).

Почта Exchange:

- При вызове списка папок для "перемещения сообщения" или чтобы "открыть другую папку", синхронизация списка папок с сервером теперь только получает изменения "с прошлого раза". Быстрее, меньшее потребление батараейки и сетевого трафика.

( если вызывать экран "доп. настройки и папки", он же "управление папками", то будет выполнена полная синхронизация списка папок, на всякий случай )

- В учётках Exchange теперь есть "загрузка по интервалу времени", то есть "10 дней", "30 день" сообщений, и т.д.

По умолчанию для новых учёток Exchange используется "14 дней".

Алгоритм синхронизации "по интервалу времени" получает только изменения. Первая проверка почты может занять какое-то время (особенность Exchange...), после этого будет заметно быстрее чем раньше. Быстрее, меньшее потреблением батарейки и трафика.

- Если Вы будете продолжать использовать "загружать N сообщений" (по количеству, а не по интервалу времени), то программа теперь может определять папки где не было изменений и пропускать их. Быстрее, меньшее потребление батарейки и трафика.

- Пуш почта для Exchange

Требуются Google Play Services (Google Cloud Messaging)

Только в полной версии программы.

Использует "облачный сервер", но не компрометирует личные данные, пусть называется "воспомогательной облачной технологией".

Эта "воспомогательная облачная технология" не имеет технической возможности доступа к Вашим письмам, не знает ни пароля ни даже адреса Вашей учётной записи, даже временно.

Через сервер (и затем через Google) проходят только абстрактные идентфикаторы, примерно вот так:

Quote
В папке e5ad981e09408394ae18363147c6ea7a5b664997 что-то поменялось

Эта папка принадлежит устройству ab9fcfa3e001c73f2c1d118bb1daa597e64bffec

А Google-идентификатор этого устройства вот такой:

cmSMMz3InWA:APA91bFRy_XTSWvqSMctWF70LAPDtR8BYZ0gjjG6YPvJdbaOAcNxntGqvYuSB9E90tCKkyzk9EaoOMZp5JSCjbh1NcclWEKMz6NGV8fMz-7Ktz7huxKOcq19QrYrRjcfcbsPnU9wO7V3

Это примерно та же архитектура, что используется в мессенджере Signal компании Whisper Systems:

http://support.whispersystems.org/hc/en-us/articles/213190817-Why-do-I-need-Google-Play-installed-to-use-Signal-

IMAP:

- Несколько изменений / исправлений / улучшений (надеюсь) в пуш-почте, особенно для Андроида 6.0+.

- Настройка "пуш почта только через WiFi" переместилась из настроек программы на уровень учётной записи, "доп. настройки и папки" - "доп. настройки"
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: stevealb on August 29, 2016, 07:24:39 pm
There seems to be a lot of data moving in this version and increased battery usage. Has anyone else noticed an increase in data usage and battery consumption?
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Finferlo on August 29, 2016, 07:27:03 pm
There seems to be a lot of data moving in this version and increased battery usage. Has anyone else noticed an increase in data usage and battery consumption?

The same for me...
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Kostya Vasilyev on August 29, 2016, 11:03:51 pm
Re: seems to be a lot of data moving in this version and increased battery usage

Hmmm... there is?

How many folders do you have in push mode? How often does something happen there (i.e. a new message, mark read/unread, etc.), every few minutes?

Is Exchange push working for you?

Can you please try turning off the new push mail at the account level and keep the "messages to sync" at same "date range value" as should already be there?

@Finferlo

As we've discovered from your debug log, AquaMail's push for Exchange will not work for you because it's blocked (presumably) by your company's IT department.

Therefore, can you please turn off push for this Exchange account to see if this changes things?
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: stevealb on August 29, 2016, 11:27:31 pm
@Kostya: How many folders do you have in push mode? How often does something happen there (i.e. a new message, mark read/unread, etc.), every few minutes?

I am syncing 3 folders: 1 inbox, sent, and drafts. This hasn't changed since I'm using AM, which is more than a year.


@Kostya: Is Exchange push working for you?

Yes, the Push is working well. It's just using a lot of battery and moving more data than usual. Nothing has changed in my usage. The only thing that changed is the AM version to include Push. Previously, I had Tasker trigger AM to check mail anytime I received a Push email from Nine. Essentially, making AM seem like it was pushing email. I'm using more data now without Tasker running and just having AM push email.

@Kostya: Can you please try turning off the new push mail at the account level and keep the "messages to sync" at same "date range value" as should already be there?

Ok. Done. What am I looking for?
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Kostya Vasilyev on August 29, 2016, 11:39:11 pm
Re: I am syncing 3 folders: 1 inbox, sent, and drafts. This hasn't changed since I'm using AM, which is more than a year.

All with push enabled? Or just the inbox (the default)?

What has changed is that previously the app would only sync changes every 15 minutes or so -- now with push, it catches up to server changes as they happen, this is what push is.

That being said, push mail uses incremental sync (only pulls in actual changes), but it will trigger more often, esp. with your heavy mail traffic.

Re: Ok. Done. What am I looking for?

Now that push mail is off, the app is back to checking mail every 15 minutes (as opposed to catching up to server changes as they happen, which is more often).

Let's see what happens to traffic and battery usage.

And one more thing:

Please go into AquaMail settings -> debug -> "Exchange push device id".

Tap that item to copy the ID to the clipboard, and please either post here or shoot me an email (kmansoft / gmail).

Once I have that, I'll take a look at my *server* logs.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: stevealb on August 30, 2016, 01:11:13 am
All with push enabled? Or just the inbox (the default)?
- Just the Inbox is push.

Let's see what happens to traffic and battery usage.
- I'll let it go like this for a couple of hours, but I can see already that the @ sign in the notification area does not show downloading attachments when the email is pulling every 15 minutes. When in push mode, the @ sign was often showing in the notification area when email arrived and the notification said downloading attachment.

And one more thing:

Please go into AquaMail settings -> debug -> "Exchange push device id".

Once I have that, I'll take a look at my *server* logs.

- Exchange push device id:
a8a5d1eedff8d33e1e6958e0518aa37288ed95a9

Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: stevealb on August 30, 2016, 05:10:42 pm
See the picture below of the data use of AM using push with the phone on for just 4 hours.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Kostya Vasilyev on August 30, 2016, 10:48:55 pm
Re: See the picture below of the data use of AM using push with the phone on for just 4 hours

Pretty low  "stay awake" time -- this is how much the app actually spent working and keeping the phone awake.

Pretty low traffic -- 12 kilobytes sent, 27 kilobytes received (if I'm reading this right, but there is no unit next to those numbers, so I'm assuming bytes).

Now the bad part -- high "total connect time".

This is Android keeping the phone's cell modem hardware awake and in a high power state long after it's no longer needed.

What Android version is this? The issue first surfaced in 5.0, affecting a lot of apps, including Google's own.

Can you please take a look at the FAQ and search the page for "battery"?

http://www.aqua-mail.com/?page_id=227
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Kostya Vasilyev on August 30, 2016, 10:56:38 pm
Quote
Once I have that, I'll take a look at my *server* logs.

- Exchange push device id:
a8a5d1eedff8d33e1e6958e0518aa37288ed95a9

Looking at a time period from "now" (~11pm in Moscow -> 8pm GMT) to about a hour back (~7pm GMT), there are server changes coming at a high rate, sometimes about once a minute, sometimes even more often than that.

AquaMail's push for Exchange is very economical when there are no changes (compared to IMAP push, which has to actively maintain a connection to the mail sever). But when there are changes, it has to catch up every time, this is what push mail is.

If you want to try disabling push for folders other than the inbox, it should help, since it won't be catching to changes in those other folders every time (only once every 15 minutes). Think you'd mentioned having 4 folders in push mode.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: stevealb on August 31, 2016, 12:04:53 am
Pretty low traffic -- 12 kilobytes sent, 27 kilobytes received (if I'm reading this right, but there is no unit next to those numbers, so I'm assuming bytes).

- It's 12MB (~12000K) and 27MB.

Now the bad part -- high "total connect time".

What Android version is this? The issue first surfaced in 5.0, affecting a lot of apps, including Google's own.

- Android 6.01 on the Samsung S7 Edge.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: stevealb on August 31, 2016, 12:06:22 am
If you want to try disabling push for folders other than the inbox, it should help, since it won't be catching to changes in those other folders every time (only once every 15 minutes). Think you'd mentioned having 4 folders in push mode.

- only inbox is push. The other 3 are just synced.

AM on push for exchange has definitely upped my battery consumption from 5.5%/hour to over 10%/hour. Not good.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Kostya Vasilyev on August 31, 2016, 12:23:04 am
Re: - It's 12MB (~12000K) and 27MB.

Hmm... If that's what is really is, then yes, that would be insane over 4 hours.

FWIW, I can't get the numbers of that screen to update at all on my S6 Edge.

Re: 5.5%/hour to over 10%/hour. Not good

Yes, this is very high.

Well, debug log please? Something like 2-4 hours should be enough.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: stevealb on August 31, 2016, 12:34:22 am
Well, debug log please? Something like 2-4 hours should be enough.

- Will do. Thanks
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: aquatix on August 31, 2016, 12:01:20 pm
Hi all, running this build on my Nexus 6P with Android 7, and it seems the notifications aren't respecting my settings regarding the action buttons anymore: I just get the default 'Reply, Mark Read, Delete' buttons, instead of my custom configuration.

Is this a bug? It worked just fine when I was still on Marshmallow.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Kostya Vasilyev on August 31, 2016, 09:19:54 pm
Re: Android 7

Yes, Android 7 is treated as a smart watch, because of its notification enhancements (each message gets its own action buttons), but maybe it should not be because of a certain bug which I'd reported and which Google has no intention of fixing...

...in other words, I'll need to take a look.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Kostya Vasilyev on August 31, 2016, 09:51:46 pm
Re: Yes, Android 7 is treated as a smart watch

Sorry I'm unable to reproduce this, in the emulator. My Nexus 5X has not updated yet, I will take a look again when it does.

Meanwhile, I'll make the "reply" optional (by adding an option just like for the other actions).
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: aquatix on September 02, 2016, 09:54:05 am
Thanks for looking into it. I miss the "move to spam" button :) Let me know if I can test something for you.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: aquahill on September 13, 2016, 12:38:15 am
I cannot get the push feature to work at all. 

I noticed just today that you introduced the push for exchange feature, something I've really been looking forward to in a beta test.  So I went ahead and upgraded to the Aqua Mail pro version (long overdue - AM is the best email client out there) and then downloaded the beta app from Google Play.  But I still cannot get the Exchange account to push emails.  I turned off the scheduled sync, and turned on the "enable Push mail, instant message delivery" under the "Mail, receiving tab".  I checked off the "Push mail" box in "Account options".  But nothing is happening.  I also checked that the Google Play Services function is on.  I've tried other combinations, but can't figure out what could be controlling the feature.

I must be missing something.  But what?  I get the feeling I either have something off that I should have on, or the reverse.  I have Android 5.0.1 on my Samsung S4 (which I am stuck with until the new, new Note 7 is released and I get it back). 

Any suggestions?

Thanks.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: aquahill on September 13, 2016, 11:30:35 pm
Thanks, checking the folder option for push email worked!  I didn't need to download the apk file.

FYI, I had already checked boxes in two other locations for push email:  Under general Settings, "Mail, receiving" as well as after long pressing the Account and then under options.  I had missed the third one under folders - I was used to using that tab only to change the colors for the folders in the view.  I should have checked the Folders tab first.

Thanks again for your help.
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Kostya Vasilyev on September 15, 2016, 10:46:05 pm
The one under folders is enabled by default, but I suppose it may not be if you upgrade -- since the older versions did not have push for Exchange accounts at all. This must be the explanation for why you needed to go in and enable it at the folder level.

One word of caution -- you will want to re-enable the "Scheduled sync" setting, this will serve two purposes:

1 - It will "get" the folders which don't have push enabled (normally you'll only have push mail enabled for your most important folders)

The app is has logic to skip "push enabled" folders when it does it scheduled sync, btw.

2 - It will act as a watchdog for push mail code (just in case...)

Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: StR on September 15, 2016, 10:56:25 pm
One word of caution -- you will want to re-enable the "Scheduled sync" setting, this will serve two purposes:

1 - It will "get" the folders which don't have push enabled (normally you'll only have push mail enabled for your most important folders)

The app is has logic to skip "push enabled" folders when it does it scheduled sync, btw.

2 - It will act as a watchdog for push mail code (just in case...)

Kostya,
a) I am confused: I thought that scheduled sync would sync the folders no matter what, and that's why your 2nd statement above.
But if the scheduled sync skips "push enabled" folders, how does it act as a watchdog for push?

b) I understand that you wrote this about PUSH for Exchange.
Does Push for IMAP also skip those folders that are push-enabled?

c) I have seen that in Motorola (Droid Razr M on 4.1.2) stock e-mail app, when PUSH is enabled, does not seem to catch the change in the status of the message (e.g. when it is read).
I've never tested how Aquamail (IMAP PUSH) behaves in that regard. If only PUSH was enabled and no scheduled syncing, would it notice the message status change?
In other words, is it a limitation of the Push protocol, or rather the limitation of its particular implementation?
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: Kostya Vasilyev on September 15, 2016, 11:13:38 pm
@StR:

Confusion is my middle name :)

- Scheduled sync "knows" when a folder is push enabled and is up to date -- "everything's working as intended" -- and will skip those.

This applies to both IMAP and Exchange, even though the implementations are entirely different.

- AquaMail's push does notice message status changes and also deletions. Both IMAP and Exchange allow this (just as long as the developer is willing...)
Title: Re: Version 1.6.4-dev1.3 - "work in progress" - Google Play "beta"
Post by: StR on September 15, 2016, 11:27:25 pm
Thank you for the explanation. All clear now.