Learn how to query what the user has previously purchased.
- [Presenter] Now we are ready to fill out…our billingUpdatesListener.…Let's go to just before the semicolon…and type in equals, new, BillingManager…and then let's select billingUpdatesListener.…Our billingUpdatesListener contains three callbacks…and we'll discuss the other two later.…The one we are interested in for now…is onBillingClientSetupFinished.…We wanna do a check on whether our pricing string…has been initialized or not.…So, let's type in if, TextUtils,…is empty,…and we pass in subscriptionSkuPrice.…
So if we have an empty pricing string,…let's call billingManager, querySkuDetailsAsync.…And we're gonna pass in BillingClient, SkuType SUBS.…The other parameter we pass in…is our list of subscriptionSkus.…And the last one we pass in…is a SkuDetailsResponseListener.…So let's create a new one here.…
And in our SkuDetailsResponseListener, in line 50,…let's add in a logging string.…Pass in our TAG.…And the message will be SUBS sku detail.…And we concatenate with skuDetailsList…and call the size parameter.…Now let's initialize our subscriptionSkuPrice.…
- Setting up an existing app for In-app Billing
- Working with the Gradle build system
- Registering a keystore
- Defining and accessing Gradle build configuration parameters from code
- Setting up a payments merchant account
- Setting up IAB test accounts
- Publishing the APK to Google Play alpha
- Defining managed products and subscription products
- Implementing In-app Billing
- Testing in-app purchases
Skill Level Intermediate
Q: This course was updated on 07/20/2018. What changed?
A: The following topics were updated: UI setup for in-app billing, adding public key, publishing your APK to Google Play alpha, and implementing in-app billing.
Android App Development: RESTful Web Serviceswith David Gassner2h 49m Intermediate
1. UI Setup for In-App Billing
2. Understanding the Gradle Build System
3. Setting Up for In-App Billing
4. Defining In-App Products
5. Implement In-App Billing
Next steps1m 40s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.