New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Callbacks not being called when uploading large file #24
Comments
Can you try setting it to |
@ZumWoelkchen is problem still present? |
@nedimf Problem is still present with I will try to track it down further. Pretty sure the problem only occurs with "larger" files. Will report back! |
@nedimf As suspected the problem only occurs on large files. I compressed the images to ~300kB and it works perfectly now! How does the timeout work? Will it only timeout when the app can't establish a connection to the email server (e.g. bad cellular reception, no wifi, ...) or does it always timeout when exceeding the time set even while the mail is still sending? I'd love to say the problem is solved but the problem still persists on larger files. It's fine for my usecase but maybe someone else will stumble into the same problem at some point. Still i am very satisfied with your work! |
@ZumWoelkchen Timeout in the app works in a way that it always times out by time factor you specify. That is because app is wrapping around JavaMail API/Jakarta Mail which is ancient project by now and does not give us any timeout information we can use. Library compressing the file is not really ideal, I would rather let user to deal with that. Thanks for the kind words. |
That's a pity but i'll just set it to 30.000ms to give some headroom. While compressing the images is not ideal it's not a problem in my usecase. The app is only targeted to people in our company (delivery) and drivers can send photos from dropoff places, damages and so on. Quality doesnt really matter. Im using the compressor library from zelory. Just add this to gradle Compression can't be called from the UI Thread. I'm using an experimental library to do inline async calls. Which is not recommended and experimental coroutine support will be dropped soon! Async library by metalab: Additional Librarys: Compression function: Can be called like this: |
Sadly I can't do anything about it, I know thats issue but the JavaMail that library are using, can't give us that data. |
I'm using this library to send images taken by the camera. It works as expected but i have a major issue. The Callbacks aren't reliable. It doesnt call onSuccess or onFail even though the message got through as expected.
Logcat output is: W/Success: Success, mail sent [STATUS: true]
onSuccess nor onFail fired.
It appears to work fine when i remove the image attachment. Attachment size is approx 3MB. Increasing the Timeout to 30 seconds doesnt fix the issue.
The text was updated successfully, but these errors were encountered: