Open gkpo opened 7 months ago
hhhhhhh, I have the same problem. hhhh, God maybe help me.
I got it working in the end!!! After so many attempts and a little bit of luck as well i guess. There were so many parameters to take into account! I'm going to try to list them here:
Use the "subscriptions" screen from the iapExample app (https://github.com/dooboolab-community/react-native-iap/blob/main/IapExample/src/screens/Subscriptions.tsx). Leave it as is, except specify your own product_id in the subscriptions skus section.
I think I finally understood how the library works. You first need to build your app (I built with expo) then download the .aab file and on your play console account, in the internal testing section, you can upload your .aab build. Once uploaded, go to the "downloads" tab of the release you just created, you can then download the "signed apk". This is the version that you install on your device. I think this signature is what links the app to the play store account.
I had it working once in a simulator but then I couldn't get it working (empty subscriptions again) so I had to install the Signed APK on a physical device instead. So maybe try that.
When you create subscriptions and pricing plans, they won't be visible straight away from the subscriptions screen. In fact the first time I saw something being displayed was the day after the day I had coded it (that's why I say it was a bit of luck). So count at least a few hours before hoping to see your changes reflected on the device.
Even if it is in internal testing, you should publish your app. I'm not sure but I think it is necessary to have the subscriptions available through the API.
Add the google account email that is linked to the device to the license testing email list (https://blog.logrocket.com/implement-react-native-in-app-purchases-android-apps/#add-license-testers). Not sure this is mandatory either but I did it regardless. Also this will allow you to be in test mode and not be charged with your bank card.
That's all I can recall for now. But yeah, google ecosystem is crazy confusing and there is not much documentation about this library either.
Hope this helps!
Thank you, I will try those steps.
I'd like to know if this release's status is ok for me to test react-native-iap?
Luckily, I have solved this problem finally.
Post your solution here as it might help others :)
Le ven. 3 mai 2024 à 06:45, Rick @.***> a écrit :
Luckily, I have solved this problem finally.
— Reply to this email directly, view it on GitHub https://github.com/dooboolab-community/react-native-iap/issues/2720#issuecomment-2092113857, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHII5EVRX6JS7TFEFPFUD3ZAMI5LAVCNFSM6AAAAABFXWIX46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSGEYTGOBVG4 . You are receiving this because you authored the thread.Message ID: @.***>
I am still getting an empty array after pushing my app to internal testing as well as closed testing. Can someone let me know how to solve this problem in Android? I have done all the things mentioned above. When I download the closed testing version, I still do not see any subscriptions.
Luckily, I have solved this problem finally.
Can you please post your solution here?
Luckily, I have solved this problem finally.
could you please share your solution?
Environment:
I managed to get the subscriptions list on iOS but now I'm trying to do so on android and the
getSubscriptions
method is not returning anything.How does the library even work ?
In fact I'm a bit lost about how it even works. How does react-native-iap know which Google Play project is associated with my mobile app and where to fetch the products and subscriptions from? Unlike other libraries, there is no API key or anything that I had to set in my project.
I have uploaded my .apk (.aab actually) to my play store app, and now the play store project is aware of the bundle ID. Is that how it works ?
Regardless of how it works.. why it doesn't work !!! 😭😭 any help would be much appreciated !!!