Join Albert Lo for an in-depth discussion in this video IabGateway setup for purchase, part of Android App Development: In-App Purchasing.
- [Instructor] Okay so we pasted in the code…to show dummy data for our test menu dialogue…and now we need to modify this code…to show real pricing data that we define…in the Google Play console.…So instead of the hard-coded array…this will be a dynamically generated array now.…So I'm going to delete that and then…let's get a reference to the context.…I'm going to use photo apps, get instance.…
So this will give us a local reference…to the application context.…Now let's fill out our options array.…The first element we will call the getString method.…And we'll pass in the string subscription period monthly.…Which I've previously defined.…Now if you're getting this fully qualified string…and you want to shorten it.…Let's just move over to the left, press the light bulb,…and select replace qualified name with import.…
Now let's scroll up a bit.…The first element will show the subscription skew price.…So I'm going to copy that in line 126…and then paste it into our getString method.…Let's copy this line on 138 and paste it right below.…
- 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.