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

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

Open
3 tasks done
2jfw opened this issue Feb 1, 2025 · 4 comments

Comments

@2jfw
Copy link

2jfw commented Feb 1, 2025

Guidelines

  • I have searched searched open and closed issues for duplicates
  • I am submitting a bug report for existing functionality that does not work as intended
  • 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

@greyson-signal
Copy link
Contributor

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.

@marchbold
Copy link

marchbold commented Feb 3, 2025

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

@greyson-signal
Copy link
Contributor

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?

@marchbold
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants