Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Receive shares with both text and media #537

Open
Komposten opened this issue Jul 5, 2020 · 0 comments
Open

Receive shares with both text and media #537

Komposten opened this issue Jul 5, 2020 · 0 comments

Comments

@Komposten
Copy link
Member

Problem
Currently Okuna uses the share Intent's type to determine whether text or media was shared. However, some apps might send Intents with both text and media. In that case one of the two will be ignored by Okuna.

Solution

  1. Always check intent.getStringExtra(Intent.EXTRA_TEXT) for text content.
  2. Extract the MIME type from intent.getParcelableExtra(Intent.EXTRA_STREAM) (assuming the stream is non-null) and check if it is an image or video. Handle accordingly.

Note: I don't know if this will have any unintended side-effects, so it should be tested extensively.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant