Node.js

Set up Imports and Constants

Create the main file: MainActivity.kt

At the top of your MainActivity.kt, include the necessary imports:

package com.vonage.verify2.test

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.*
import okhttp3.*
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.RequestBody.Companion.toRequestBody
import com.google.gson.Gson
import com.google.gson.JsonObject
import java.io.IOException

Below the imports, define some global variables:

const val BACKEND_URL = "http://10.0.2.2:4000" // Use this IP for local testing

Getting Started with Silent Authentication

Silent Authentication takes quite a bit to understand. This tutorial shows you how to build an integration from scratch with Nodejs and Kotlin

以下の言語で利用可能:
Node.js
手順
1
Introduction
2
Before you start
3
Initialize the Project
4
Create a Simple Express Server
5
Setting up Vonage credentials
6
Add the Vonage Verify API
7
Testing the Backend
8
Create New Android Project
9
Set up app Android dependencies
10
Set up import and constants
11
Create Mobile UI
12
Networking to Backend
13
Testing Full Flow