-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Conversation
Wow, great! 👍 |
@AlexGreg +1 |
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. |
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 |
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. |
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. |
yeah, I know it's a little messed up, but I don't have so much time..I'm doing what I can 😄 |
ok..tell me if i can delete branch |
Thanks to: DrKLO/Telegram#218 DrKLO/Telegram#267 Former-commit-id: 6d89bbebcbaa9f84193a1723c4d61905f0daf5e9
This reverts commit 98a312a.
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