Learn how to parse the response from the purchase flows.
- [Instructor] Now we are ready to handle…the purchase responses from Google's billing manager…for both the subscription workflow…and the purchase workflow.…Let's scroll up to our billing updates listener.…Our billing updates listener has a callback method…called onPurchasesUpdated.…This method is where we will…want to retrieve our purchase details.…Let's add a check first.…If purchases are not equal to null…and purchases size is greater than zero.…
Then, let's check whether we have the purchase details…for SKU_Subscription_Monthly.…So we're gonna call if purchases, get element zero,…and then call get SKU.…Call the equals method.…BuildConfig SKU_Subscription_Monthly.…If we have the right purchase details,…let's call our Ib Gateway Listener.…
So, it will be listener onSubscriptionInfo,…and we will pass in the SKU.…So it'll be purchases, get element zero, get SKU.…I have an extra bracket, I'm just gonna remove that here.…Let's also add a check for whether we have…the purchase details for product cropf.…Let's type in else,…
- 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: Unit Testingwith James P White2h 58m Intermediate
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.