Android
Android SDKの追加
このアプリはMavenを使ってAndroid SDKをロードする:
- プロジェクトのルートで)プロジェクトの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
}
- あなたのモジュールの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'
}
- プロジェクトを同期する。
基本的なビデオチャット
Vonage Video API プラットフォームの基本概念(ビデオ、音声、メッセージングによるユーザ間のコミュニケーション方法など)を学びます。Vonage Video API の基本的なフローを説明します。
手順
1
はじめに2
はじめに3
新規プロジェクトの作成4
Android SDKの追加5
認証の設定6
許可を求める7
セッションへの接続8
サンプルアプリのUIを調整する9
セッションへのストリームの公開10
他のクライアント・ストリームへの加入11
アプリの実行12
結論