poiuytrez / AndroidInAppBilling

Android App Billing plugin for Cordova
173 stars 144 forks source link

How to initialize the inappbilling? #112

Closed cyrusonline closed 8 years ago

cyrusonline commented 8 years ago

I tried to use onload to initialize the inappbilling but it doesn't work ... how can we fix this?

driannaude commented 8 years ago

@cyrusonline please expand your question? What does your log say? What does your initialization code look like? Console output? ADB log? If youa re going to give us a dump of your adb log, please ensure you only copy/paste relevant information to the problem.

cyrusonline commented 8 years ago

Thanks. I think I solved this. I cannot give log because i download the app from alpha test using real device. Are there any ways to show console log when using real device or test in genymotion by using cordova cli?

driannaude commented 8 years ago

You can use the android.test.purchased product id to test your purchases in debug mode, there are a few bugs relating to signature verification, but all you have to do is reset your Google Play Store data to make your app "forget" about the purchase.

You cannot output console logs when using a production build/signed release apk. Once you are confident your purchase logic works you can replace the android.test.purchased product ids with your own, sign a release build and know that it should just work, as the test purchases follow the exact same flow as a real purchase.

driannaude commented 8 years ago

In order to better help you and others that visit though, might I recommend starting a new issue for each of your problems to better separate them? I cannot unfortunately move this thread as I am not a maintainer, but I would recommend closing it once your inital question is answered, and opening a new ticket if your next question is unrelated. I'm sure the maintainers/repo owners will appreciate it. :smiley_cat:

poiuytrez commented 8 years ago

I agree :+1: I am not very active but I will merge pull requests if there is any improvements.