RNIapActivityListener is not registered in your MainActivity.onCreate
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 () }
Did you find any solution?
I'm also facing same issue, any solution for this ?
{"error": [java.lang.Exception: RNIapActivityListener is not registered in your MainActivity.onCreate], "message": "finishTransaction"}
Same here
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.
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.