appcelerator-archive / ti.inappbilling

Other
25 stars 32 forks source link

java.lang.IllegalStateException: Setup already completed. #32

Closed andersdp closed 6 years ago

andersdp commented 6 years ago

I get this error the second time I want to open my window with in-app products. java.lang.IllegalStateException: Setup already completed.

I run InAppBilling.startSetup({publicKey: PUBLIC_KEY}); in my constructor when opening the window via Alloy.createController('creditsAndroid').open();

Do I need to call a close method on the module? Although there is none to found - what am I missing?

SDK 7.1.1

nigelunderwood commented 6 years ago

You only need to do this once in your app. Add in your app.js and then you will be fine.

andersdp commented 6 years ago

Ok, thanks. Simple enough :)

But lets say something went wrong and I want to test if setup has been done when I open my purchase window - can I do that?