0

I'm using react-native-iap for in-app purchase. But when I'm calling the getSubscriptions I'm getting back an empty array. Everything works correctly for iOS.

I have read several forums and tested almost every solution there is but nothing seems to work.

Version react-native-iap 10.0.6 also tested on 11.0.0 and 10.0.1

Version react-native 0.68.2

Version expo ~45.0.0

Expected behavior getSubscriptions returns array of products

Actual behaviour returns empty array on android

Had the problem for more than 2 weeks now and this is what I have done so far.

  1. Added the billing permission

    <uses-permission android:name="com.android.vending.BILLING" />

  2. The subscriptions is correctly added in Google Play console. Their statuses is active.

  3. The app is published.

  4. License users are added and doesnt work, neither does any normal users.

  5. I have tested it on a real android device.

  6. await initConnection(); runs first in the code and seems to work.

  7. await getSubscriptions({ skus }); runs and returns an empty array.

  8. I have also debugged in android studio and can see that the code runs the method queryProductDetailsAsync(). But it as said, returns an empty array.

Eric
  • 1

1 Answers1

-1

At the end I solved this by changing from react-native-iap to expo-in-app-purchases. Even tho expo-in-app-purchases says it's on pause and recommends react-native-iap.

Eric
  • 1