Comments (9)
It's a very interesting assignment. And it's not easy :)
Displaying messages: loading a message takes way too long. I suspect we are creating a new connection for each screen?
Yes, for now for the prototype we are creating a new connection for each screen.
This task will take a long time, and I will have to investigate some moments.
from flowcrypt-android.
Yes I understand that. It makes sense, I would do the same for a prototype. But the responsiveness/usefulness of the app would really suffer if we left it this way, I think.
from flowcrypt-android.
Yes, we need to make improvements that you described. Then the application will be much more comfortable.
from flowcrypt-android.
@DenBond7 somehow it was failing during build. Maybe some of your updates to Folder
class did not get committed? The commit above is just temporary so that I can work with the project.
from flowcrypt-android.
Maybe some of your updates to Folder class did not get committed?
@tomholub Yes, that's right. I missed one file for the commit.
from flowcrypt-android.
For me
Admittedly the thread safety rules for JavaMail are not well documented, but hopefully they mostly match what you would expect.
Multiple threads can use a Session.
Since a Transport represents a connection to a mail server, and only a single thread can use the connection at a time, a Transport will synchronize access from multiple threads to maintain thread safety, but you'll really only want to use it from a single thread.
Similarly, a Store can be used by multiple threads, but access to the underlying connection will be synchronized and single threaded.
A Message should only be modified by a single thread at a time, but multiple threads should be able to read a message safely (although it's not clear why you would want to do that).
https://stackoverflow.com/questions/12732584/threadsafety-in-javamail
from flowcrypt-android.
I like the progress here! Let me know when it's ready to test, I'm looking forward to try it.
from flowcrypt-android.
Finally, I made the stable version for testing. Now you can start testing.
After the work done, I would like to add some comments:
-
At the moment, the key object in synchronization is the EmailSyncService. Thanks to him, we use a single connection for all requests.
-
I compared how different mail clients work. For the study, I took Gmail and BlueMail. For more logical work, I think we need to improve the way we send messages and moving them to other folders. For example, we'd better mark messages as deleted and delete them in the background, like in Gmail. (Similarly sending, replying and archiving)
-
Thanks to the first, I prepared the ground for the implementation of correct synchronization. The current implementation does not take into account many moments
- We equally use all types of connections - WIFI, 3G and others. This can be bad for the device's autonomy.
- The automatic loading of new messages has not yet been implemented. You can only download them manually.
- Also we do not track the battery level. This is also not very good.
from flowcrypt-android.
Perfect, I like that you prepared it for auto sync. That will be great in the future. I'm closing this for now unless there are things that you want to add now.
from flowcrypt-android.
Related Issues (20)
- "GmailAPIException: Requested entity was not found." errors
- "Unable to start service com.flowcrypt.email.service.PassPhrasesInRAMServ" errors HOT 1
- Remove android.permission.RECEIVE_BOOT_COMPLETED as not used by the app directly
- Add email signatures support HOT 1
- user image is rendered as empty circle HOT 1
- states are lost for a lot of Gmail labels during scrolling
- version 1.5.7 HOT 3
- Error "NeedRemoteConsent" appears on user inbox HOT 2
- Field length for exception reports HOT 2
- Migration to use 'Angus Mail for Android'
- [Feature suggestion] Option to render remote contents with user consent HOT 1
- java.lang.IllegalStateException message: Data cannot occupy more than 10240 bytes in MessagesViewModel
- java.lang.NullPointerException (getLabelIds(...) must not be null)
- java.lang.NullPointerException (getMessages(...) must not be null)
- try Grouped updates for Dependabot
- version 1.5.8 HOT 2
- Update images on Google Play
- Improve switch background color HOT 1
- Fix downloading attachments
- version 1.5.9 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowcrypt-android.