react-native-iap icon indicating copy to clipboard operation
react-native-iap copied to clipboard

RNIapActivityListener is not registered in your MainActivity.onCreate

Open devhaseebashraf opened this issue 1 year ago • 4 comments

import { initConnection, getSubscriptions, } from 'react-native-iap';

export default function Subscription({navigation, route}) { const subscriptionSkus = Platform.select({ ios: [ 'com.jobs.unlimited', 'com.jobs.limited', ], android: ['com.jobs.unlimited', 'com.jobs.limited'], default: [], });

useEffect(() => { initConnection() .then(() => { getSubscriptions({skus: subscriptionSkus}).then(res => { console.log(res); }); }) .catch(err => { console.error(err); }); }, []);

return () }

devhaseebashraf avatar Nov 06 '24 15:11 devhaseebashraf

Did you find any solution?

dipen-apptrait avatar Dec 19 '24 07:12 dipen-apptrait

I'm also facing same issue, any solution for this ?

{"error": [java.lang.Exception: RNIapActivityListener is not registered in your MainActivity.onCreate], "message": "finishTransaction"}

PoojaAppinventiv avatar Jan 09 '25 05:01 PoojaAppinventiv

Same here

thur-c avatar Feb 25 '25 17:02 thur-c

I found a solution for me.

I'm using expo and a was using "paymentProvider": "both" in my app.json file, so i just changed to "paymentProvider": "Play Store":

"plugins": [ [ "react-native-iap", { "paymentProvider": "Play Store", "googlePlayPackageName": "com.app" } ], }

in my case I just need payments via Google.

thur-c avatar Feb 26 '25 15:02 thur-c

I’m closing all issues reported in versions below 14, as the library now supports the new architecture with NitroModules and has been completely revamped.

hyochan avatar Sep 30 '25 18:09 hyochan