Instagram Android Share Intent: Unable to load image2020-03-20 android ionic-framework
I'm facing an issue sending a share intent to Instagram on Android, from the last update from 3 days ago. This is on an Ionic app
I can reproduce the error in the following conditions:
- Android >= 8
- Last Instagram Version (220.127.116.11.120)
- Only sharing to Feed, Stories read the image as expected
I will not add the code I'm using to share because seems to be another thing, some change that Instagram introduced in the last update, maybe permissions or something else.
I discard the image path (read/write) because for Stories it's working fine.
Any ideas? Thanks.
I'm still try to find a solution. Meanwhile, if you are having the same issue, please leave a comment on this Facebook Bug ticket
This is a workaround solution, I think this is an Instagram bug and should be working again soon, but meanwhile, you can share to Instagram Feed using the
MediaStore. I tested this solution on Android 6 to 10.
// Save image to gallery String savedImageURL = MediaStore.Images.Media.insertImage( getContentResolver(), mediaPath, "My image", "My super image description" ); // Parse the gallery image url to uri Uri savedImageURI = Uri.parse(savedImageURL); ClipData clipData = ClipData.newRawUri("Image", savedImageURI); shareIntent.setClipData(clipData);
To make it work correctly, you will need to ask
WRITE_EXTERNAL_STORAGE permission, I handled this part on Ionic side
- Share intent issue in Instagram feed
- How to lazy load images in ListView in Android
- Sharing a sticker to Instagram Story broken?
- Strange out of memory issue while loading an image to a Bitmap object
- How to send an object from one Android Activity to another using Intents?
- How do I get extra data from intent on Android?
- Share video and sticker Image to Instagram Story on Android
- What is an Intent in Android?