Closed ChristopherGabba closed 3 months ago
Hello 👋 Thanks for you feedback, indeed some harmonization have to be done.
at the moment intent.type
it's not documented and should not be used, it's a specific value depending on ios or android native module, it can be used as a debug value. maybe i should just keep it in a debug log.
intent.file.type
is indeed a mimeType on Android, but we doesn't have the mimeType on ios for now (in v1.0 type was 0
instead of media
...), maybe we can do something based on file extension for this part.
concerning webUrl
and text
, it's more about extracting information. Text is a raw data (real data received) and webUrl a computed one via regex. it's not always duplicated. More details here https://github.com/achorein/expo-share-intent/issues/25#issuecomment-2000319286
for file meta data, you can give your feedback here : https://github.com/achorein/expo-share-intent/issues/34
@ChristopherGabba new version (1.3.0) is now consistent between android and iOS.
shareIntent.type
(media | file | text | weburl) to know which attribute to readshareIntent.files[0].mimeType
for iOS and AndroidshareIntent.files[0].size
for iOS and Android@achorein You are the man, lets go, going to try it out now!
On another note, I've never contributed to open source before, I'm a hobbyist programmer who enjoys building apps and to be honest I've never really masted GIT, but have always waited for the right project to help out on.
I'd love to fork this project and make some documentation changes just to learn the ropes (adding function descriptions, etc.). Can you provide a step by step Contributing
section to your docs? I tried:
cd
into the fork's location and I tried the command npm install
and it all went to sh**. After I fork the repo and git checkout
, how can I effectively run the project on my iOS and android device, make a few changes, and then commit it back for you to review? These NPM packages don't quite act like a normal project when I run npm install
. Do I need to cd into the example
folder? (Sorry in advance, I'm an idiot)
all right, here we go CONTRIBUTING.md for running instructions.
You can check this doc for the PR workflow https://www.dataschool.io/how-to-contribute-on-github/ or https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project
Describe the bug When sharing a photo from camera reel into app from:
Android:
iOS:
These should at least be the same on iOS and android. Proposal: Take one type and call it
shareIntentType
(or something like that) and call the other typemimeType
. Getting mimeType would be awesome for iOS if possible to drive consistency.Additionally when sharing webUrls on both platforms: Android:
iOS:
Proposal to install some sort of regex function on android to determine if it's a url or not and make it the same as iOS. Additionally no need to duplicate data on the "text" and webUrl. If it's not exclusively a url, then call it text, otherwise call it a webUrl.
Just trying to drive consistency between the two packages. Right now I have several
Platform.select
sections in my javascript to account for these differences, but it really shouldn't have to be that wayThrowing one last feature request in there:
If the user shares a video or image file, would be so sick to get the metaData of the files like (width, height, video duration, file size, etc.). I'm using the
react-native-compressor
package to get some of the metadata right now but would be awesome if that was built in.Environment Android and iOS
Expo 50 using latest version of npm install expo-share-intent