Learn how to create a signing config to manage keys and certificates for debug and production release builds.
- [Instructor] As previously mentioned, in-app purchases must be made on a signed, production-release APK. What this implies is that we can only upload production-release APKs to to the Google Play console. Creating a production-release APK involves two parts. The first is to create a product flavor. So to create a product flavor, let's open up our project view, and let's select the app modules build.gradle. I'm going to close our project view right now.
Let's scroll down to signingConfigs, right on line 24, and let's define product flavor. Our first product flavor will be production, and production will have two attributes, applicationId and minSdkVersions. I'm going to my defaultConfig, and I'm going to delete these two attributes and then paste it into my production product flavor. I'm going to define a second product flavor called dev.
Dev will also have an applicationId and a minSdkVersion. So let me copy that from production and paste it into dev. For the dev product flavor, applicationId will have an extra name called .dev, and we will change the minSdkVersion to 21, and the reason for changing the minSdkVersion for our dev product flavor is because this allows it to skip the predexing process, and it allows us to have faster Gradle builds for dev product flavor.
Okay, let's press Gradle sync to make sure everything's okay, and now we are done with creating a product flavor.
- 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.