Android

Android SDKの追加

このアプリはMavenを使ってAndroid SDKをロードする:

  1. プロジェクトのルートで)プロジェクトのbuild.gradleを編集し、以下のコード・スニペットを allprojects/repositories セクションを参照されたい:
mavenCentral()

この時点で、build.gradleファイルは以下のようになっているはずだ:

buildscript {
    repositories {
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.2'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
  1. あなたのモジュールのbuild.gradle(app/build.gradleファイル)を修正し、dependenciesセクションに以下のコード・スニペットを追加する:
implementation 'com.vonage:client-sdk-video:2.31.0'

Vonage Video Android 2.16.0以上をご使用の場合は、以下を android セクションも同様だ:

compileOptions {
    sourceCompatibility JavaVersion.VERSION_11
    targetCompatibility JavaVersion.VERSION_11
}

この時点で、モジュールのbuild.gradleファイルは以下のようになっているはずだ:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 32

    defaultConfig {
        applicationId "com.example.myapplication"
        minSdkVersion 16
        targetSdkVersion 32
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.annotation:annotation:1.1.0'
    implementation 'com.vonage:client-sdk-video:2.31.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
  1. プロジェクトを同期する。

基本的なビデオチャット

Vonage Video API プラットフォームの基本概念(ビデオ、音声、メッセージングによるユーザ間のコミュニケーション方法など)を学びます。Vonage Video API の基本的なフローを説明します。

手順
1
はじめに
2
はじめに
3
新規プロジェクトの作成
4
Android SDKの追加
5
認証の設定
6
許可を求める
7
セッションへの接続
8
サンプルアプリのUIを調整する
9
セッションへのストリームの公開
10
他のクライアント・ストリームへの加入
11
アプリの実行
12
結論