Node.js

Create a New Android Project

In this part, we will build a modern Android application that uses Jetpack Compose for the UI and integrates with the Vonage Verify API for 2FA (Two-Factor Authentication).

Overview

The application will follow this flow:

  1. User enters their phone number.
  2. App sends the phone number to the backend for verification.
  3. If Silent Authentication is successful, the user is verified.
  4. If it fails, the app prompts the user to enter the SMS code.
  5. The app submits the code for verification.
  6. The user is notified of the verification result.

Create the Android Project

  1. Open Android Studio.
  2. Click New Project → Empty Compose Activity.
  3. Set the following:
Name: Verify2FADemo
Language: Kotlin
Minimum SDK: API 24 (Android 5.0)
  1. Click Finish and wait for the project to build.