Join Albert Lo for an in-depth discussion in this video User selection for purchase, part of Android App Development: In-App Purchasing.
- [Instructor] So just to recap,…we passed in a reference to IaB gateway…to handle the listener for set single choice items.…Set positive button.…And set negative button.…In other words, IaB gateway will handle…all three behaviors and it will be done…in this on-click method.…So let's start implementing the on-click method.…First I'm just going to rename this to Dialog Interface.…Now let's get a local reference to dialog…and we can do that by casting dialog interface to dialog.…
Let's rename this to ID.…And I'm going to add a switch case…on my ID.…So the first case we want to handle…is when the user selected option element zero.…In this first case we're going to define…a local string and set it to the selected choice.…Let's define a private string here…and we'll call it Selected Choice.…
I'm going to copy that here.…When the user selects first option element,…we'll set the selected choice to…Subscription Monthly.…If the user selects the second choice,…then we set selected choice…to Product Crop.…
The next case we will add is for when…
- 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
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.