Signal not handling multiple image intent correctly / Seems to be failing to process parameters, expecting only single file uri
Guidelines
- [x] I have searched searched open and closed issues for duplicates
- [x] I am submitting a bug report for existing functionality that does not work as intended
- [x] This isn't a feature request or a discussion topic
Bug description
There may be an issue with sharing multiple assets (multiple image intent) to Signal app.
I'm using an AIR Native Extenstion (Share ANE, https://airnativeextensions.com/extension/com.distriqt.Share/) which supports sharing multiple assets to an App. When I select Signal, the sharing process will not work. However, sharing a single asset to Signal will work. (Sharing multiple assets to a different app (e.g. WhatsApp) will work, too.)
The author of the Native Extension (@marchbold) investigated this and commented:
Not sure there's a lot we can do here, appears that Signal is not handling the multiple image intent correctly. Seems to be failing to process the parameters, expecting only a single file uri.
android.os.BadTypeParcelableException: About to unparcel a java.util.ArrayList, which is not a subtype of type android.net.Uri required by caller
Could you check this out and/or comment on Signal handling the multiple image intent?
This issue is based on the following issue: https://github.com/distriqt/ANE-Share/issues/215 Please note that the repository is only accessible for members but I'm adding the linkage here as it will crosslink both issues, for reference
Screenshots
No response
Device
Sony XZ2
Android version
Android 10
Signal version
7.30.2
Link to debug log
I can share multiple photos/videos from Google Photos or the Samsung Gallery into signal no problem. If you're trying to share multiple documents/non-media-files into Signal, then no, we do not support that.
Can you elaborate on the details of the Intent we need to create to have this work successfully?
We haven't been able to get it to work with the Intent.ACTION_SEND_MULTIPLE and setting an array of Uris shared via our fileprovider, basically we are doing:
Intent intent = new Intent( Intent.ACTION_SEND_MULTIPLE );
intent.putExtra( Intent.EXTRA_TEXT, description );
intent.putParcelableArrayListExtra( Intent.EXTRA_STREAM, uris );
intent.setFlags( Intent.FLAG_GRANT_READ_URI_PERMISSION );
intent.setType( "image/*" );
startActivityForResult( Intent.createChooser( intent, "title" ), REQUESTCODE );
(Note this works with other applications we have tested).
I think the issue is that you have a mixture of EXTRA_TEXT and EXTRA_STREAM, which we don't support very well right now. I imagine if you dropped the EXTRA_TEXT when the description is absent/empty in your flow it may work, but I can also look into the change on android. Are there other apps you know of that share a mixture of text and multiple images that I can test with?
Thanks for this, definitely appears to be the issue.
I can confirm if I remove EXTRA_TEXT from the intent it correctly shares multiple images.
@greyson-signal: Is there any plan on changing the current behavior, so I can have multiple assets and text (like "correctly" handling the intent and not fail when the text extra is present)? If not, would it make sense to add a feature request for this?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I think this warrants a fix, pretty simple one?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to inactivity.