react-native-send-intent icon indicating copy to clipboard operation
react-native-send-intent copied to clipboard

RNSendIntentAndroid.openAppWithData is not a function

Open ghost opened this issue 6 years ago • 10 comments

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?

ghost avatar Oct 11 '19 20:10 ghost

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.

lucasferreira avatar Oct 11 '19 22:10 lucasferreira

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

ghost avatar Oct 11 '19 22:10 ghost

Can you run a clean build of your Android app to double check?

Em sex, 11 de out de 2019 às 19:14, kaiss [email protected] escreveu:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lucasferreira/react-native-send-intent/issues/104?email_source=notifications&email_token=AABZH736UICMNGABB5TCLJTQOD3D3A5CNFSM4I77FAI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBBLDQY#issuecomment-541241795, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABZH7YVOWQK6OSH2NW2CRLQOD3D3ANCNFSM4I77FAIQ .

-- Atenciosamente,

Lucas Ferreira @lucasferreira

lucasferreira avatar Oct 12 '19 00:10 lucasferreira

Hi @kaaiss

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

lucasferreira avatar Oct 18 '19 16:10 lucasferreira

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",

gudwnsdl88 avatar May 08 '20 07:05 gudwnsdl88

Hi @gudwnsdl88

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

lucasferreira avatar May 08 '20 13:05 lucasferreira

Same issue please help

zhietan avatar Dec 14 '21 13:12 zhietan

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

bereket42 avatar Apr 21 '22 12:04 bereket42

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 ?

adarsh-sgh avatar Apr 01 '23 13:04 adarsh-sgh

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.

lucasferreira avatar Apr 03 '23 11:04 lucasferreira