New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] getProducts return always an empty array #140
Comments
Same issue here My snippet:
My response on adb.logcat (Android) 208 28473 28524 I ReactNativeJS: Running application "testingIap" with appParams: {"rootTag":11}. DEV === true, development-level warning are ON, performance optimizations are OFF But with iOS I get the array with the datas well format. PD1 I get the recommendation from https://medium.com/@dooboolab/react-native-in-app-purchase-121622d26b67 PD2 "Help me Obi Wan Kenobi you're my only hope" Package.json snippet: |
@vadermemo @martinberbesson Hi~ Could you share your js code for
Also, draft app testing is no longer supported. Pleaser refer to guide. Make sure to publish your app to alpha or beta channel. |
Hi @dooboolab This is my data Best regards PD1 My app is in alfa version, even don't get the products. |
@vadermemo this souds really bad to me.. sorry for that. It works fine in my environment. I will debug more tommorow and surely get back tommorow! Also could you try to catch the statement and see what’s appearing there? |
i think i need to have a alpha release... Upload a apk with billing permission is not enough |
@dooboolab Well, if there exists a something help for you, maybe is next point: when I put the configuration on react-native-billing I putted in the resources file "string.xml" the param string name="RNB_GOOGLE_PLAY_LICENSE_KEY" The try-catch that you required throws the next log:
const itemSkus = Platform.select({
async componentDidMount(){
}
getProductDetails = async() => {
6.Finally the log is the next: @martinberbesson I have an app on alpha release, even I can't get the products. I think is another thing, maybe a configuration in react-native-iap or google console. |
@martinberbesson @dooboolab Incredible!! I made another app with the same steps and the app is working on iOS and Android!!. I can`t believe it. I don´t know which is the reason, but I think is something configuration on code or google console. PD I was waiting 5 hours to get the correct itemSkus. Best regards, |
@vadermemo Glad that it is working. Also, for newer iap module for android which is v3, you don't need to put anything else in |
Per #124 I think this is still occurring - at least for existing apps which it would be good to have a solution for this as well. |
For anyone who's still running into this issue, you should first of all read https://stackoverflow.com/a/35132936/1374827 and ensure you've met all the requirements outlined in that post. If that stuff is all good, check that you are calling the appropriate function. For me, I had an app where I was only using Subscription in-app purchases, but I was mistakenly calling In the same vein, make sure you're calling |
Ok after wrestling with this, my issue turned out to be my inexperience with android. I had been messing with the package name in dev and while it ran fine on the device, the package name not being set up perfectly is why it was returning an empty array. After following these steps and these it's all looking good. |
I also getting empty array, Thanks! |
same |
@bharatidudhjiya @tmjordan If you guys are facing configuration issue, I'd like you to try pure android |
@hyochan thanks, it's a good idea. I will do that |
thank you man @hyochan |
I solved it! I am using these versions,
just do it like this
|
Make Sure you have the correct package name for your application. and in case you have changed it from react-native command. it won't still work. You have to do it manually and then clean the project using ./gradlew clean in the android folder. after that give it a try. Happy Coding. |
I got empty array response can any one help me I have spent 3 days |
did anyone resolved? i am also getting empty array regardless of doing every step |
Version of react-native-iap
0.3.15
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
Get All products
Actual behavior
All work fine on iOS but getProducts return always an empty array on android.
I think its a config problem however i followed each step...
APK upload with billing permission / merchant account set up / Create in app purchase...
The text was updated successfully, but these errors were encountered: