Join Albert Lo for an in-depth discussion in this video MainActivity setup for purchase, part of Android App Development: In-App Purchasing.
- [Announcer] Alright, now we are ready…to implement the backing data for the purchase dialogue.…I'm going to open up the project view…and I'm going to select Main Activity.…Let's scroll to the top.…So at the top, let's create a private class member.…And it'll be IabGateway and the name will be IabGateway.…I'm going to copy the variable name…and let's paste it into line 59.…
Now let's call the constructor, IabGateway.…It will take in IabGateway listener.…And main activity will implement IabGateway listener.…So let's pass in the reference to main activity.…Now let's scroll back down to get config dialogue…on line 247.…I'm going to take all of this and we'll replace this.…
So let's delete it with command X and I'm going to…replace it with return.…And I'm going to use IabGateway to return…an instance of AlertDialog.…So IabGateway will have its own config dialogue method.…And we'll call that method configdialogue.…We'll pass in the builder parameter.…Now let's go in and find our method.…Select and create method configdialogue.…
- 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.