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

fixed remote upload of images (eg. the one in your backup Google folder) #218

Closed
wants to merge 3 commits into from
Closed

fixed remote upload of images (eg. the one in your backup Google folder) #218

wants to merge 3 commits into from

Conversation

AlexGreg
Copy link

if you try to upload an image from your Google backup for example (ie is not in your local storage) i'ts doing nothing.
After this fix it works: the changes for uploading image are made only in ChatActivity and Wallpaper one..
Are you using image upload elsewere?

for more infos: https://developer.android.com/guide/topics/providers/document-provider.html#client
at the paragraph Open a document -> Bitmap

@ffflorian
Copy link

Wow, great! 👍

@hendrikhofstadt
Copy link

@AlexGreg +1

@DrKLO
Copy link
Owner

DrKLO commented Feb 27, 2014

There is already function for this: https://github.com/AlexGreg/Telegram/blob/master/TMessagesProj/src/main/java/org/telegram/messenger/Utilities.java#L752

But it's not used in some places.

@AlexGreg
Copy link
Author

Yes, I saw that function. It is used in https://github.com/DrKLO/Telegram/blob/master/TMessagesProj/src/main/java/org/telegram/ui/Views/AvatarUpdater.java#L143 for example. Another place where you can upload an image..the avatar

But as before, it's not working with remote images. In fact, Android Team discurage the use of paths for images and they advice to use file descriptors.

I'll try to modify this class too, trying not to alter too much the original code

@DrKLO
Copy link
Owner

DrKLO commented Mar 4, 2014

There is a bug in android gallery when you trying yo share photo directly from galley.

Permission Denial: opening provider com.android.gallery3d.provider.GalleryProvider from ProcessRecord{430d9de8 29380:org.telegram.messenger/u0a136} (pid=29380, uid=10136) requires com.google.android.gallery3d.permission.GALLERY_PROVIDER or com.google.android.gallery3d.permission.GALLERY_PROVIDER

Adding this permission doesn't help.

@DrKLO
Copy link
Owner

DrKLO commented Mar 4, 2014

It's because of different activities, now I removed LaunchActivity and now ApplicationActivity proceed all intents. I will upload source code later today, can't merge this patch, but I will add reference to you. Also it was not a good idea to load whole bitmap in memory, I changed you code a bit.

@AlexGreg
Copy link
Author

AlexGreg commented Mar 4, 2014

yeah, I know it's a little messed up, but I don't have so much time..I'm doing what I can 😄
Thank you!

@DrKLO DrKLO closed this Mar 4, 2014
@AlexGreg
Copy link
Author

AlexGreg commented Mar 4, 2014

ok..tell me if i can delete branch

DrKLO pushed a commit that referenced this pull request Mar 4, 2014
@AlexGreg AlexGreg deleted the fix-remote-image-upload branch March 4, 2014 19:32
nekohasekai pushed a commit to NekogramX-Backup/NekoX that referenced this pull request Mar 26, 2020
Thanks to:
DrKLO/Telegram#218
DrKLO/Telegram#267

Former-commit-id: 6d89bbebcbaa9f84193a1723c4d61905f0daf5e9
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus added a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
vivabelarus pushed a commit to vivabelarus/Telegram that referenced this pull request Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants