Reputation: 21
I'm trying to implement in-app-billing in my app and followed the google tutorial. But when i try to pass my sku (Already configured with an id in developer console) as a string parameter it keep's telling me that it is an invalid symbol.
mHelper.launchPurchaseFlow(this, pacote1, 10001, mPurchaseFinishedListener, "pct120160503");
Error:(253, 48) error: cannot find symbol variable pacote1
If i replace pacote 1 whith a variable i keep receiving this error:
Error:(35, 35) error: unreported exception IabAsyncInProgressException; must be caught or declared to be thrown
what i'm doing wrong?
Thanks
Upvotes: 1
Views: 374
Reputation: 262
You need to call this method with try and catch:
try {
mHelper.launchPurchaseFlow(this, pacote1, 10001, mPurchaseFinishedListener, "pct120160503");
}
catch (IabAsyncInProgressException e) {
}
Upvotes: 2