zedix•

Very cool. Did you base any of the code on IabHelper that Google provides, or is this all your own code? The IabHelper code is riddled with bugs so I'm curious to see if you just scrapped it and wrote the logic for purchasing yourself?

4
0x800OP•

Hi zedix,

sorry for a late reply.

I’d be lying if I said I haven’t peeked at the IabHelper code. Luckily, except for a few constants and the onStop method, nothing is copied from it.

The code follows samples from the in-app billing docs and has been working without any issues for a few months in production.

I’m glad you like it and I hope you’ll find it useful. Cheers!

1
Glurt•

Let's see if I understand this, this library is takes care of purchasing a one time update and giving callbacks to my Activity that tell it whether or not to show adverts?

I'm going to be implementing something similar in an app I'm making at the moment so I'm tempted to use this.

3
shieet123•

Correct!

The library checks if the specified sku has been purchased. If it has, you’ll receive a callback saying you should not show ads (the callback onHideAds() will be invoked). Otherwise, onShowAds() will be invoked.

Purchasing and querying sku information is straightforward too - just call mPremiumer.purchase(activity) or mPremiumer.requestSkuDetails().

2
0x800OP•

Hi guys, author here.

A week ago, I made my xkcd browsing app free and open source. It seemed wasteful to throw away the billing code I was left with, so after a bit of polishing, Premiumer was born.

I’ll be around to answer any questions/feedback/concerns you may have.

2
Turtlecupcakes•

What's the different between onPurchaseBadResult and onPurchaseBadResponse? I'm guessing one of them refers to the IAP api returning a 500 or other error while the other is user cancellation, but the documentation has them listed the same way

1
0x800OP•

You were very close - the docs do mention the difference, just after the first line :)

onPurchaseBadResult: This happens if the Activity.onActivityResult resultCode is not equal to Activity.RESULT_OK.

onPurchaseBadResponse: This happens if either onActivityResult data is null, or the billing response is not BILLING_RESPONSE_RESULT_OK.

Hope this helps.

1
Boots_Mcfeethurtz•

This looks great and would love to give it a try. I am attempting to implements ads in an app for the first time so I am very new to this.

Where do I start, are there good online resources anyone can recommend that has the latest best practices? Thanks for making this

1