I am implementing in-app billing in an android game. I found that the developer web pages have two completely different guides on different pages. This one seems to work:
Preparing Your In-app Billing Application
This one I have not been able to make work:
Implementing In-app Billing
I don't know why they show two different ways to do the same thing and I want to make sure I'm using the right one and if there's a difference between the two.
The first guide you mention Preparing Your In-app Billing Application provides you with helper classes to do all the hard work for you. You are best to follow this guide.
To understand what is happening in the helper class provided you can read the Implementing In app billing link.
Related
I'm developing an app in which i'm planning to add a donate feature, but googling about it, found that when using paypal or other 3rd party for this feature attracts google to suspend you're app.
How to implement a Donate feature and also make sure that google doesn't suspend my app?
If any option any example with same would also help me in ways.
if paypal an example link or if google wallet an example.
Thanks in advance
A common thing I see a lot is to make 2 versions of your app, 1 free and 1 donate version. Or heck, you could just use Google Play In-app Billing and offer some kind of small extra feature for the payment.
I am about to implement inApp Purchases in my app, but Iam totally confused about which way to go. On Android developer site there are different aproaches, but it is not clear why there are 2?:
http://developer.android.com/training/in-app-billing/index.html
and
https://developer.android.com/google/play/billing/api.html
I feel for you. I found the the tuts on this guy's blog very useful for cutting through the confusion. If you follow his process, you can, I attest, successfully implement in-app billing. I've linked to the older tutorial, I followed, but he's got a newer one as well (see the link on that page), which includes Github-hosted source code and updates to support the latest Android library changes.
Here you can find TrivialDrive example app utilizing In-app Billing V3. It's sample app directly from Google.
The most important class is IABHelper, source code here.
The link posted by JASON G PETERSON is pointing to a deprecated version of In-app Billing V2. Here's link to the version 3: http://blog.blundell-apps.com/simple-inapp-billing-payment-v3/
I would like to add some IAPs to my Android 4+ app. This seems to be quite easy, but there is one problem: Google offers two tutorials that describe how to use the latest IAP API v3 which use pretty different implemenations. Which one is the better/correct one?
Implementing In-app Billing describes how to implement a 'ServiceConnection' to bind an activity to 'IInAppBillingService'. The service is used directly to do all the IAP stuff like querying product information or performing purchases.
Preparing Your In-app Billing Application on the other hand describes how to use the IabHelper class to connect to the Service and run all IAP related Stuff.
I am confused about how these two tutorials are connected. There is no information about the relationship between the tutorials and the different approaches they describe.
So far I think, that the IabHelper is just a wrapper that should help to use the IInAppBillingService in a more convenient way. Is this right?
Using a convenience wrapper to make work with a complicated task more easy is often a good and nice idea. On the other hand a wrapper not only keeps the complicate implementations away from the developer but also the direct feedback/responses from the API. This can make debugging harder. Having this in mind: Which is the better solution? Using the API directly as described in the first tutorial or to use the IabHelper?
These tutorials are nice to learn how IABv3 works. However, if you are in a hurry or need to add IAB to several apps, the simplest and fastest way is to use this library:
https://github.com/anjlab/android-inapp-billing-v3
From my previous experience it is quite nice to read them both. And to use IabHelper as example of the proper in app purchase flow. First tutorial describes how to use Billing API and other describes with code block how to implement this API. For the fast and reliable code try to use existing code from second tutorial with IabHelper.
If you take a look at IabHelper class, you can see it contains every single pieces of code from Implementing In-App Billing tutorial.
So, Preparing Your In-app Billing Application provide a set of classes (IabHelper) that convenient for you to use In-App Billing v3.
Well, In my opinion, we should use IabHelper to get the best practice for the In-App Billing implementation. You also write your own class if you need some extra purpose for the project.
I am using AndroidBillingLibrary for purchasing. But I don't know how to get the price of purchase (in-app item) in code. If it possible using the library, because this library based on In-app Billing API version 2? I saw that it is possible in API version 3 link
This is impossible. But I implemented in-app Billing version 3. This is not so hard, there is a great and very simple documentation link. Also Google provide a sample which anyone can download and use how to install sample
if you use API3 of the in-app billing library, this feature is already there.
it seems it's called "getSkuDetails" .
for more information, watch the google IO 2013 lecture "In-App Billing Version 3" : https://developers.google.com/events/io/sessions/324958374 , slides 104-107 .
you can also read the documentation...
sadly, even though they've added many nice features and made it easier, they've removed the feature of unmanaged purchases, but that's a different story.
Currently I Am developing an magazine reader app. In my app I want to provide the Subscription facility where user can have monthly subscriptions. I am having a doubt that is there a subscription facility in android market. I went through the Google docs.I fond that now its not available. But still I am having a doubt and little bit confused. Can any one tell me about this. Any help will be appreciated.I really want to clarify this for the further movement.
Yes, there is an API that facilitates subscription. It's called In-app Billing and it's one of the most difficult to use payment APIs I ever encountered.
The subscription based payment model was recently announced, and as Bill The Ape has said, it is quite difficult to use and understand.
Some useful links:
In-app billing overview
Implementing in-app billing with a tutorial
Implementing subscriptions
You can play around with the sample application, and re-use bits for your own app. If you do, make sure you read this so that the app is secure.
What you're looking for is:
https://developer.android.com/guide/google/play/billing/billing_subscriptions.html
I actually disagree with Bill The Ape. The documentation and sample code is pretty decent. Google has a sample application that demonstrates subscriptions. The only issue is testing subscriptions, that's where there's very little support