Comments (4)
I'm guessing that is not possibile since we had JavaScript doing this "bridge" between RN and Native APIs, so we have to work with "strings"/text instead of Blob and files in method parameters.
But vcard/text are text/plain "files" so if you read the file content before call some JS methods, in this specifically case, it mighty be possibible.
from react-native-send-intent.
Thank you for your fast feedback @lucasferreira, but could you elaborate a bit more please?
I would have to modify this module source code though, right? I can't just use the openChooserWithOptions method, correct?
If you don't plan on adding this feature, can you recommend any other package that does the job?
from react-native-send-intent.
The method openChooserWithOptions was not built by me. It's a contribuition made in this PR: #26
I can't help you with the "read vcard file" thing, but since you got the vcard content in string format you could try something like that:
const myVCardContent = `BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest;;Mr.;
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TEL;TYPE=WORK,VOICE:(111) 555-1212
TEL;TYPE=HOME,VOICE:(404) 555-1212
EMAIL:[email protected]
REV:2008-04-24T19:52:43Z
END:VCARD`;
SendIntentAndroid.sendText(myVCardContent, 'text/vcard'); // or text/x-vcard
Using sendText method you could pass some "mime type" of your content, so your Android Device could "guess" what the best app to deal with this "mime type".
Finally I recommend you to test in real devices with proper apps installed to handle vcard files.
from react-native-send-intent.
@lucasferreira , yea that actually uses the share sheet I'm looking for showing my android device apps but I need the file itself not the content. Thank you anyway
from react-native-send-intent.
Related Issues (20)
- how hang up phone dial in react native with button
- Typings for openApp wrong
- openFileChooser with http url not working
- open whatsapp and start to chat with a number HOT 1
- Intent.ACTION_SET_WALLPAPER In React Native
- Is possible get result from the external app?
- cancel button while install HOT 5
- Send Text + Image through WhatsApp
- File Chooser dont working
- Support for Android 11 HOT 1
- RNSendIntentAndroid.sendTextWithTitle is not a function
- openAppWithUri not working HOT 2
- Execution failed for task ':react-native-send-intent:generateDebugRFile'. HOT 4
- Question about converting an `am` command to `react-native`
- Installation guides is not correct HOT 2
- how to call custom action intent? ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION HOT 2
- Not working on Android 10 onwards HOT 3
- App Opening but not clicking on send button
- SendIntentAndroid.openApp opens apk with linking not intent, when app is restarted
- Compatible with newer RN versions?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-send-intent.