This page describes how to use Firebase Phone Number Verification with your Android app in production. See the Get started on Android guide to learn how to test Firebase PNV in an Android app using SIM-less test mode.
Once production mode is active, your app will be able to get verified phone numbers on real devices, as long as they have supported hardware and a supported carrier.
Before you begin
Implement and test the Firebase PNV user flow and backend integration by following the steps in the Get started on Android guide.
You must be signed into the Firebase console as a user with Owner privileges on the app's project.
You must have a publicly accessible privacy policy to complete OAuth brand verification. You can use Firebase Hosting to create a basic web app to host your privacy policy.
1. Disable test mode in the app client
To disable testing mode, remove the following line from the Firebase PNV library initialization code:
Kotlin
fpnv.enableTestSession(/* token */) // Remove this.
Distribute the app compiled with that line removed as your production client.
You can continue to create non-public development builds of your app client that
include the enableTestSession() line.
Note that phone number verification won't work in production until you also complete the steps in the next section.
2. Enable production in your project
Follow these steps to enable Firebase PNV production mode for your Firebase project:
On the Credentials page of the console, open your Android API key and add the Firebase Phone Number Verification API to the list of selected APIs.
Firebase PNV requires the Blaze billing plan. If you have not already upgraded your project to the pay-as-you-go Blaze pricing plan, you will be prompted to during onboarding.
Although Firebase PNV requires a billing account to be attached to your Firebase project, during the preview phase, you won't be billed for the service.
If you haven't yet specified your app's SHA-256 fingerprint in the Firebase console, do so from the Project settings. Refer to Authenticating Your Client for details on how to get your app's SHA-256 fingerprint.
On the Production tab of the Firebase console Phone Verification section, click the Upgrade to production button.
You will see a list of the apps in your project that will be enabled for production, and have the opportunity to add additional apps.
Next you must submit your app for OAuth brand verification, and a privacy policy review. Google Cloud will verify that you are clearly and accurately identifying your app and its privacy policy.
To begin the review, click the Proceed in Google Cloud button. This process can sometimes take 24 hours or more.
While you are waiting for brand verification, review the Firebase Phone Number Verification service specific terms, which are linked to on the console.
After you have passed brand verification, check the box to acknowledge the service specific terms and then click the Enable button.
Firebase Phone Number Verification is now active in production mode.