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.
Related
As you may know Google Play in-app review dialog is an upcoming feature
Here is a working proof of concept app : IAR Test App
I wanted to use this unofficial feature, I did a search and I found this:
Exploring in-app reviews: part 1
But there is no decompiled source code, Can someone share with us a working code?
Google Play's In-App Reviews is now available here.
I've found in android developer page two tutorials to use billing with Android: Selling In-App products and Play Billing Library
Why Google have provided both ways to work with in-app billing? Which one google recommend to use with Android Studio?
The first tutorial you are referencing (Selling In-App products) was the original method. Last year Google created the Play Billing Library as a wrapper to simplify the implementation.
As they explain in the documentation:
The library is a wrapper for the Android Interface Definition Language (AIDL) file that defines the interface to the In-app Billing service. You can use the Play Billing Library to simplify your development process, allowing you to focus your effort on implementing logic specific to your app, such as displaying in-app products and purchasing items.
If you are integrating the In-app Billing service in your app using an alternative language such as C++, or you want to interact directly with the AIDL file, see Implementing In-app Billing.
In other words:
If your project is a standard Java/Kotlin app, the Play Billing Library is the preferred method, as it will simplify your implementation.
If you are using C++ or for some reason need to access the AIDL file, use the old method.
The official documentation is incredibly unclear when it comes how you’re supposed to be handling in-app billing.
For starters there are two versions of TrivialDrive:
github.com/googlesamples/android-play-billing
And then from the official docs:
developer.android.com/google/play/billing/billing_integrate.html
(here it says to import the IInAppBillingService.aidl file and use ServiceConnections / IInAppBillingService)
developer.android.com/training/play-billing-library/preparing-iab-app.html
(here it says to look at Trivial Drive v2, and also use compile 'com.android.billingclient:billing:dp-1' instead of importing the .aidl file, and to use BillingManager)
developer.android.com/training/in-app-billing/preparing-iab-app.html
(here it says to look at Trivial Drive, import the .aidl file, and use the IabHelper + associated listeners for everything instead)
Can anyone clarify why such a crucial part of the Android platform has different explanations for things all over the place? What's the intended / latest framework we need to be using? Which pieces are outdated? Which TrivialDrive should I be referencing?
As discussed in In-app Billing Version Notes, In-app Billing API is versioned with each version offering additional features to your app. With this, you may want to first check for your In-app Billing version.
At run time, your app can query the Google Play Store app to determine what version of the API it supports and what features are available.
If you are using in-app billing version 3 or later, the version information is not directly returned by Google Play. Instead, you can check if Google Play supports the version of the In-app Billing API that you are using by sending an isBillingSupported request.
If the In-app Billing API version that you are using is earlier than version 3, the version information is returned in the API_VERSION key of the Bundle object passed in the sendBillingRequest method. For more information, see In-app Billing Service Interface.
If you're using In-app Billing version 3 API, use this TrivialDrive for the Version 3 API as stated in In-app Billing Overview. Otherwise, see migration considerations wherein it was stated that,
The In-app Billing Version 2 API was discontinued in January 2015. If you have an existing In-app Billing implementation that uses API Version 2 or earlier, you must migrate to In-app Billing Version 3.
Lastly, this documentation is a preview release of the Play Billing Library. For In-app Billing Version 3 API, you may want to use this as reference instead.
Hope that helps in clearing things up.
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/
Does anyone know how to make a simple app in android dev eclipse with a simple in app purchase item like 50 coins for 0.50p in android because there are absolutely no tutorials out there and the android in app billing example isn't exactly helpful.
The current version of Android In App Purchase is V3
http://blog.blundellapps.com/simple-inapp-billing-payment-v3/
My blog post is titled Simple In App Purchase v2, so that might help:
http://blog.blundellapps.com/simple-inapp-billing-payment/
I've also recently written an overview with a flowchart to try and explain InApp Purchase (not so simple):
http://blog.blundellapps.com/overview-of-android-in-app-billing-flowchart/ (v2)
Does this library (AndroidBillingLibrary) solve your problem?
Attention!
Here is answer for IAB v2
And you, most likely, looking for v3 (which is much simpler)
Don't get in this trap, as I did...
Google I/O 2013 - In-App Billing Version 3 - http://www.youtube.com/watch?v=DgcJPIRpfSk
You can check example with library for inn app billing.
Example