Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Signal not handling multiple image intent correctly / Seems to be failing to process parameters, expecting only single file uri

Open 2jfw opened this issue 10 months ago • 5 comments

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

https://debuglogs.org/android/7.30.2/27c22976584fc544d8976955a624919cb7761f209b3f4433553c6c1e9b8221d6

2jfw avatar Feb 01 '25 22:02 2jfw

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.

greyson-signal avatar Feb 03 '25 16:02 greyson-signal

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).

marchbold avatar Feb 03 '25 23:02 marchbold

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?

greyson-signal avatar Feb 04 '25 21:02 greyson-signal

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.

marchbold avatar Feb 24 '25 00:02 marchbold

@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?

2jfw avatar Mar 11 '25 12:03 2jfw

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.

stale[bot] avatar May 10 '25 13:05 stale[bot]

I think this warrants a fix, pretty simple one?

marchbold avatar May 11 '25 00:05 marchbold

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.

stale[bot] avatar Jul 10 '25 00:07 stale[bot]

This issue has been closed due to inactivity.

stale[bot] avatar Jul 17 '25 00:07 stale[bot]