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

RNSendIntentAndroid.openAppWithData is not a function #104

Open
ghost opened this issue Oct 11, 2019 · 10 comments
Open

RNSendIntentAndroid.openAppWithData is not a function #104

ghost opened this issue Oct 11, 2019 · 10 comments

Comments

@ghost
Copy link

ghost commented Oct 11, 2019

I get this error when i use:
SendIntentAndroid.openAppWithData("android.intent.ACTION_VIEW", "https://www.w3schools.com/html/mov_bbb.mp4");

error:
[Unhandled promise rejection: TypeError: RNSendIntentAndroid.openAppWithData is not a function. (In 'RNSendIntentAndroid.openAppWithData(packageName, dataUri, mimeType, extras || {})', 'RNSendIntentAndroid.openAppWithData' is undefined)]

how to fix it?

@lucasferreira
Copy link
Owner

Have you upgraded your package from a older version?

The function/method really existis:
https://github.com/lucasferreira/react-native-send-intent/blob/master/android/src/main/java/com/burnweb/rnsendintent/RNSendIntentModule.java#L583

So I guess that you have to do some clean build or reinstall this package to try again.

@ghost
Copy link
Author

ghost commented Oct 11, 2019

I have latest version of package and reinstall don't fix the problem.
I checked with console.log
console.log(SendIntentAndroid),
console.log(SendIntentAndroid.openAppWithData)
and this function/method existis but I'm still getting the error

@lucasferreira
Copy link
Owner

lucasferreira commented Oct 12, 2019 via email

@lucasferreira
Copy link
Owner

Hi @kaaiss

I forgot to ask, what its your React Native version?

@gudwnsdl88
Copy link

what is problem i have a same error

this is my package.json about RN

"react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",

@lucasferreira
Copy link
Owner

Hi @gudwnsdl88

I guess that our package didn't work with Expo, only with 100% RN pure apps.

@zhietan
Copy link

zhietan commented Dec 14, 2021

Same issue please help

@bereket42
Copy link

I have the same issue with a 100% react native app.

@adarsh-sgh
Copy link

Is linking still required even after autolink support in react native ?
since react-native link is removed from react-native now, do we need to link manually or will it get auto linked ?

@lucasferreira
Copy link
Owner

Hi @adarsh-sgh,

Sadly I really don't know, since I do not have any free time by this days to update this package (much because Java-native part), I really don't know if it possible to use this extension without link command nowadays.

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

No branches or pull requests

5 participants