Join Albert Lo for an in-depth discussion in this video MainActivity setup for purchase, part of Android App Development: In-App Purchasing.
- [Instructor] Alright, now we are ready to implement…the backing data for the purchase dialog.…Before we do that, I noticed…in our billing updates manager…in the onBillingClientSetupFinished callback…I wanted to type in TextUtils.isEmpty,…and it came out as isDigitsOnly.…So let's go ahead and fix that.…And let's also check the one below.…Let's copy the isEmpty method in line 51…and replace isDigitsOnly in line 60.…
Okay, now let's open up MainActivity.…I'm gonna open up a project view,…and under the app module, in our photos integration module,…let's select ui package,…and let's open up MainActivity.…Now let's scroll to the top.…On line 48, let's insert a new line.…We're going to declare a private member for IabGateway…So it'll be private, type IabGateway,…and the name is IabGateway.…
Now let's copy iabGateway,…and let's scroll down to the end of our onCreate method.…Let's paste it,…and let's call the constructor new IabGateway.…Now remember, IabGateway takes two parameters.…The first is an activity, so let's pass in this…
- 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.
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.