Skip to content
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

[WiP] Fixing Image Downloads #114

Closed
wants to merge 2 commits into from
Closed

Conversation

vanitasvitae
Copy link
Collaborator

This is done in a very hacky way. We should consider to rework image downloading/sharing etc. completely. (Also with ImageDownloadNotifications and ImageViewers in mind (#107))

@vanitasvitae
Copy link
Collaborator Author

I'd propose to ditch the DownloadManager completely and to download all images via InputStreams. Images needed in the app (eg. profile picture) can stay how they are atm. Images the user wants to download will be saved to disk (and in case of sharing they get shared from there). We can implement the determination of the filetype by comparing leading bytes (like I did), but using a PushbackInputStream, to take a look at the first bytes.
After we determined the filetype, we can then go ahead and download the image (either to a bitmap, or to a gif), save it to memory and show a notification or share it to another app.

Update title when showing contacts

Update manage-tags and reports title
@gsantner
Copy link
Owner

gsantner commented Dec 3, 2016

Isssue no102 merged into #107

destinationFile.getAbsolutePath(), Toast.LENGTH_LONG).show();
}
SaveImageTask saveTask = new SaveImageTask();
saveTask.setContext(context);
Copy link
Owner

@gsantner gsantner Dec 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constructor (Context context)

}
} catch (IOException ignored) {
}
File destinationFile = new File(Environment.getExternalStorageDirectory() + "/Pictures/Diaspora/"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "dandelion");

@gsantner gsantner modified the milestones: 0.2.3, v0.2.2 Dec 18, 2016
@gsantner
Copy link
Owner

Has this PR something usable, or complete rework anyway? Can be closed?

@vanitasvitae
Copy link
Collaborator Author

@gsantner I'll have to revisit this once I have time again.

@gsantner gsantner deleted the fix-image-download branch September 5, 2018 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants