Author Topic: Version 1.6.2-dev5.4 - "work in progress", not in Play  (Read 11787 times)

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Version 1.6.2-dev5.4 - "work in progress", not in Play
« on: May 06, 2016, 08:07:31 pm »
https://www.aqua-mail.com/download/AquaMail-market-1.6.2-dev5.2.apk

https://www.aqua-mail.com/download/AquaMail-market-1.6.2-dev5.3.apk

https://www.aqua-mail.com/download/AquaMail-market-1.6.2-dev5.4.apk



+ Conversations: made possible to combine messages by sender and subject even if otherwise unrelated. App settings -> conversations.

I've written before that "this app does not and will not combine into threads messages which are unrelated and don't have References or In-Reply-To headers".

Well, I was wrong.

There is now a new setting (in app settings -> conversations) to "combine messages based on sender + subject".

This will combine into threads: forum notifications, automated messages, any other messages with same sender and subject even if the standard headers to "link" those messages are missing.

Off by default, requires re-indexing threads if changed (same screen, two items down).

+ Gmail: made possible for system accounts to perform OAUTH2 authentication via Google's web site, avoiding issues with Google Play Services.

Background:

- A Gmail account in AquaMail which is also present in the phone's system settings

- In this case, AquaMail will use Google Play Services to get OAUTH2 authentication tokens

- Since the account is already present in system settings, and Google Play Services is aware of it -- the user doesn't have to enter the account's password when adding the account into AquaMail

Problem:

- On some mobile networks (never WiFi), when AquaMail calls into Google Play Services to "refresh the access token", this fails with a network error *inside Google Play Services*.

- Per the documentation, supposed to be transient, but it just ain't so -- once it starts to fail on a particular network, it will keep failing (on that particular network).

Existing workaround:

- Remove the account from AquaMail, add back as "Internet Mail" account type, re-typing the password

- May require enabling "Allow less secure apps to access accounts" (oh the wording, the wording!)

New feature / workaround:

- The ability to *not* rely on Google Play Services for OAUTH2, keeping the account in AquaMail, and keeping using OAUTH2

New accounts:

- Do not select a system account from the drop-down, rather choose "Other" and AquaMail will open Google's web site where you can log in

Existing accounts:

- Long press the account -> account setup -> *enable* "Force web based login" and AquaMail will open Google's web site where you can log in

Either way, Aqua will use its own "web based" OAUTH2 code (not Google Play Services), which was already in place for @gmail accounts *not* present in system settings.

It won't be necessary to enable "less secure apps".

It will be necessary to enter the password -- on Google's web site which the app will open in a window, but the app won't see, store, or transmit this password.

The setting can be turned off later if needed and the app will once again get its OAUTH2 tokens from Google Play Services.

All of this (enabling / disabling "force web based login") can be done without re-creating the account in AquaMail.



+ Цепочки: возможность объединения сообщений по отправителю и теме, даже если они не являются ответами друг на друга. Настройки - цепочки сообщений.

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

Объединение происходит по адресу отправителя + заголовку.

+ Gmail: сделал возможным для системных учётных записей авторизацию OAUTH2 через веб сайт, чтобы не нарываться на проблемы с Google Play Services.

Предыстория:

- Учётка @gmail которая уже есть в системных настройках, и также добавляется в Акву

- В этом случае программа будет использовать Google Play Services для получения "OAUTH2 токенов авторизации"

- Так как учётка уже есть в системе, и Google Play Services об этом известно, то при добавлении учётки в программу нет необходимости вводить пароль.

Проблема:

- В некоторых мобильных сетях (с WiFi ни разу не было), получение токенов через Google Play Services не работает, оттуда приходит "ошибка сети".

- В документации написано что это временная ошибка -- но это не так, если это начинает происходить в какой-то сети, то будет происходить и дальше, то есть вообще перестаёт работать (в этой сети).

Старый способ обхода ошибки:

- Удалить учётку из Аквы, добавить заново как "Интернет Почту" (не Gmail), при этом придётся ввести пароль

- Может потребоваться включить (на сайте Google) "доступ к аккаунтам для небезопасных приложений" (лихая формулировка).

Новый способ / новая возможность:

- Программа теперь умеет не зависеть от Google Play Services даже для @gmail учёток которые есть в системе, и при этом использовать OAUTH2

Новые учётки:

- Вместо выбора системной учётной записи из списка -- нужно выбрать "другой" (адрес) и программа откроет сайт Gmail где нужно будет авторизоваться.

Существующие учётки:

- Длинное нажатие на учётке - основные настройки - включить галочку "Авторизация через сайт", и программа откроет сайт Gmail где нужно будет авторизоваться.

И в том и другом случае, программа будет использовать свой собственный код а не Google Play Services для получения токенов авторизации OAUTH2 -- тот самый который уже используется для учёток @gmail которые не настроены в системе.

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

Будет необходимость ввести пароль -- на сайте Gmail который программа откроет в окне, но программа не увидит и не будет хранить или передавать этот пароль по сети.

Эту галочку можно выключить при желании, и программа снова будет использовать для данной учётки получение токенов через Google Play Services.
« Last Edit: May 08, 2016, 01:48:11 am by Kostya Vasilyev, 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/

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Version 1.6.2-dev5.2 - "work in progress", not in Play
« Reply #1 on: May 06, 2016, 08:59:15 pm »
Re: in Inbox, it combines on subject, with different senders. Is it an expected behavior?

Not for me, just tried it. Perhaps same sender is you, i.e. those are sent messages?
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/

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Version 1.6.2-dev5.2 - "work in progress", not in Play
« Reply #2 on: May 06, 2016, 09:26:18 pm »
re: + Conversations: made possible to combine messages by sender and subject even if otherwise unrelated.

This is fantabulous!! For the first time conversation messages counts in Aqua and Gmail largely agree! Smile goes ear-to-ear and halfway around the back. Ok...that's a bit freaky. :o

The only subtitle difference is the message list display order: Aqua uses the newest message in a conversation for positioning while Gmail keys on the oldest. In this case Aqua has a distinct advantage over Gmail IMHO. Can't tell you how many times I have to go digging for an older conversation in Gmail that received a recent update but is pushed way down in the message list. Aqua displays it right on top where one would expect to find it. Brilliant!

I realize message list ordering is not new but it becomes more relevant now that message counts match. I also understand Gmail's native presentation behavior can be mitigated via inbox views or third party filters that must be added to every machine. Yuk. Aqua just does it. Thank you for another dose of email sanity. :)

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Version 1.6.2-dev5.2 - "work in progress", not in Play
« Reply #3 on: May 06, 2016, 09:30:03 pm »
Re: This is fantabulous

Wow, never thought it would be such a big deal...

Considered it an edge case for forum notifications and the like (e.g. my daily "VPS backed up" emails) and for "other people's" mail app which don't set those message-id headers...

:)
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/

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Version 1.6.2-dev5.2 - "work in progress", not in Play
« Reply #4 on: May 06, 2016, 09:31:00 pm »
combine on sender + subject:

in Inbox, it combines on subject, with different senders. Is it an expected behavior?
Other users, would you please test?
Works OK for me but I am using Gmail's message combining algorithm as a reference point. Everything aligns as expected. But you may have a different view on how combining should work or taking "sender + subject" literally.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Version 1.6.2-dev5.3 - "work in progress", not in Play
« Reply #5 on: May 06, 2016, 09:37:49 pm »
Re: in Inbox, it combines on subject, with different senders. Is it an expected behavior?

Fixed in 1.6.2-dev5.3 (above)
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/

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Version 1.6.2-dev5.2 - "work in progress", not in Play
« Reply #6 on: May 06, 2016, 09:40:38 pm »
Re: This is fantabulous

Wow, never thought it would be such a big deal...
Hard to understate the benefit - especially for lengthy conversations with multiple voices. Invariably there would be a few 'orphaned' emails that became disassociated with the main conversation. I would have to seek those out with creative search strings which is why pasting into the search box was such a big deal a few revs back. Somethimes it was just easier to use a native Gmail client. Now all voices (and their offspring) are comfortably nestled together in a big happy family, just as God and Gmail intended.

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Version 1.6.2-dev5.3 - "work in progress", not in Play
« Reply #7 on: May 06, 2016, 09:50:27 pm »
re: Fixed bug reported by @Paris Geek

Well, that was short lived. 1.6.2-dev5.3 busted it. Messages are now combined as literally stated in the option descriptor but not in the logical manner that keeps all related content together.

I am sagging right now and lack the will to mount another lengthy appeal for a feature that plays to Gmail conventions but not those of other mail clients. Heading out for a few beers as I mourn the loss of dev5.2. Such a short life; so much unrealized potential.

p.s. Perhaps a hidden switch for combining messages by whatever alogorythm was used in dev5.2 ....

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Version 1.6.2-dev5.3 - "work in progress", not in Play
« Reply #8 on: May 06, 2016, 09:55:04 pm »
Re: p.s. Perhaps a hidden switch for combining messages by whatever alogorythm was used in dev5.2 ....

It was looking at sender only ignoring the subject. This was wrong. Sorry!
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/

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Version 1.6.2-dev5.3 - "work in progress", not in Play
« Reply #9 on: May 06, 2016, 10:04:53 pm »
Re: p.s. Perhaps a hidden switch for combining messages by whatever alogorythm was used in dev5.2 ....

It was looking at sender only ignoring the subject. This was wrong. Sorry!

Paris Geek reported it the other way around: looking at the subject, ignoring the sender.

in Inbox, it combines on subject, with different senders. Is it an expected behavior?

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Version 1.6.2-dev5.3 - "work in progress", not in Play
« Reply #10 on: May 06, 2016, 10:06:44 pm »
Re: Paris Geek reported it the other way around: looking at the subject, ignoring the sender.

Um, yes, sorry, it was ignoring the sender -- which is consistent with Davey126 observations.

But I'm now seeing a bug where some messages should be combined and they are not -- so maybe there is hope yet for Davey126's case!
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/

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Version 1.6.2-dev5.3 - "work in progress", not in Play
« Reply #11 on: May 06, 2016, 10:17:49 pm »
Re: But I'm now seeing a bug where some messages should be combined and they are not

Found it.

-dev5.4 soon.
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/

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Version 1.6.2-dev5.3 - "work in progress", not in Play
« Reply #12 on: May 06, 2016, 10:19:19 pm »
Having read multiple requests from users on this forum for this and other mechanisms for linking messages into chains, including a rather obnoxious one in Russian, I've thought about a novel feature for Aquamail:
Random linking of messages.
This would be a bomb! No other app has that! It will be lot's of fun!
 ;D

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Version 1.6.2-dev5.3 - "work in progress", not in Play
« Reply #13 on: May 06, 2016, 10:22:54 pm »
Re: Random linking of messages.
This would be a bomb! No other app has that! It will be lot's of fun!

To put some sort of logic into it:

By a single character randomly picked from the sender's name transliterated in Russian.

By "randomly" I mean SecureRandom of course (to protect the user's privacy) -- and it would even be different between two or more phones if accessing same account!
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: Version 1.6.2-dev5.2 - "work in progress", not in Play
« Reply #14 on: May 06, 2016, 10:50:31 pm »
The only subtitle difference is the message list display order: Aqua uses the newest message in a conversation for positioning while Gmail keys on the oldest.


Even for this edge case you will find a specific setting in AquaMail:

> Menu > Settings > Conversations > scroll down to dection "Customize" and enable "Reverse when expanded" (... from older to newer)