achorein / expo-share-intent

🚀 Simple share intent in an Expo Native Module
MIT License
119 stars 10 forks source link

feat: add meta info (like title) to share intent object on Android #44

Closed RobinHeidenis closed 3 months ago

RobinHeidenis commented 3 months ago

Summary

When sharing a link on Android, the browser adds the page title to the share intent. This is stored in the Intent.EXTRA_TITLE property. The library currently has no way of accessing this extra information. This PR adds a meta object to the share intent with a title property. This way consumers of the library can access the title property in their code. On iOS the meta object will be empty.

The code has been set up so it's easily extendible. It will be a small change to add another extra property.

Todo

Issue

fixes: #38

RobinHeidenis commented 3 months ago

@achorein I've implemented your changes. Good call on adding to the other example projects, I forgot about that. Anything else we can optimize here?

achorein commented 3 months ago

Looks good to me 👍