From 48e68793cae3935903f2646735714ce03797dbd4 Mon Sep 17 00:00:00 2001 From: isaacakakpo1 Date: Mon, 18 Mar 2024 09:50:49 +0000 Subject: [PATCH] Keep Alive Impl --- androidApp/build.gradle.kts | 74 ++++- androidApp/src/main/AndroidManifest.xml | 7 +- .../janusmessagesdk/android/MainActivity.kt | 14 + androidApp/src/main/res/values/styles.xml | 2 +- gradle/libs.versions.toml | 6 + iosApp/Podfile | 4 - iosApp/Podfile.lock | 2 +- iosApp/Pods/Manifest.lock | 2 +- iosApp/Pods/Pods.xcodeproj/project.pbxproj | 268 +++--------------- .../Pods-iosAppTests-Info.plist | 26 -- ...Pods-iosAppTests-acknowledgements.markdown | 27 -- .../Pods-iosAppTests-acknowledgements.plist | 59 ---- .../Pods-iosAppTests/Pods-iosAppTests-dummy.m | 5 - ...ts-frameworks-Debug-input-files.xcfilelist | 2 - ...s-frameworks-Debug-output-files.xcfilelist | 1 - ...-frameworks-Release-input-files.xcfilelist | 2 - ...frameworks-Release-output-files.xcfilelist | 1 - .../Pods-iosAppTests-frameworks.sh | 186 ------------ .../Pods-iosAppTests-umbrella.h | 16 -- .../Pods-iosAppTests.debug.xcconfig | 11 - .../Pods-iosAppTests.modulemap | 6 - .../Pods-iosAppTests.release.xcconfig | 11 - iosApp/iosApp.xcodeproj/project.pbxproj | 59 +--- iosApp/iosApp/TestJanusClasses.swift | 11 +- settings.gradle.kts | 9 + .../janusmessagesdk/Platform.android.kt | 1 + .../com/telnyx/janusmessagesdk/janus/Call.kt | 94 ++++-- .../janus/CreateTransaction.kt | 2 - .../com/telnyx/janusmessagesdk/janus/Janus.kt | 18 +- .../janusmessagesdk/janus/KeepAliveAck.kt | 18 +- .../telnyx/janusmessagesdk/janus/Register.kt | 50 ++-- .../telnyx/janusmessagesdk/janus/Trickle.kt | 57 ++-- 32 files changed, 315 insertions(+), 736 deletions(-) delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests-Info.plist delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests-acknowledgements.markdown delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests-acknowledgements.plist delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests-dummy.m delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests-frameworks-Debug-input-files.xcfilelist delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests-frameworks-Debug-output-files.xcfilelist delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests-frameworks-Release-input-files.xcfilelist delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests-frameworks-Release-output-files.xcfilelist delete mode 100755 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests-frameworks.sh delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests-umbrella.h delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests.debug.xcconfig delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests.modulemap delete mode 100644 iosApp/Pods/Target Support Files/Pods-iosAppTests/Pods-iosAppTests.release.xcconfig diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index a1072e4..6c82edc 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -1,6 +1,7 @@ plugins { alias(libs.plugins.androidApplication) alias(libs.plugins.kotlinAndroid) + } android { @@ -12,6 +13,8 @@ android { targetSdk = 34 versionCode = 1 versionName = "1.0" + multiDexEnabled = true + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } @@ -24,17 +27,82 @@ android { getByName("release") { isMinifyEnabled = false } + getByName("debug") { + isMinifyEnabled = false + isJniDebuggable = true + isDebuggable = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), // Default ProGuard rules for Android optimization + "proguard-rules.pro" // Custom ProGuard rules file + ) + } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = "17" + jvmTarget = "11" + } + testCoverage { + this.jacocoVersion = "0.8.11" // Use the latest version compatible with your setup + } + + + testOptions { + unitTests.all { + + } + unitTests.isIncludeAndroidResources = true + unitTests.isReturnDefaultValues = true } } dependencies { implementation(projects.shared) + implementation("org.jacoco:org.jacoco.agent:0.8.11:runtime") + implementation("org.jacoco:jacoco-maven-plugin:0.8.11") + + + implementation(libs.appcompat) + implementation(libs.material) + implementation(libs.constraintlayout) + implementation("com.github.team-telnyx:telnyx-meet-android-sdk:0.3.1@aar") { + isTransitive = true + } + implementation("androidx.core:core-ktx:+") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:4.1.0") + testImplementation("org.mockito:mockito-inline:4.1.0") + testImplementation("org.mockito.kotlin:mockito-kotlin:3.2.0") + testImplementation("org.junit.platform:junit-platform-runner:1.0.2") + testImplementation("commons-codec:commons-codec:1.12") + testImplementation("androidx.arch.core:core-testing:2.1.0") + testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.0") + testImplementation("io.mockk:mockk:1.12.1") + testImplementation("io.mockk:mockk-agent-jvm:1.12.1") + + // Acceptance Testing + androidTestImplementation("androidx.test.espresso:espresso-contrib:3.1.0") + androidTestImplementation("androidx.test:runner:1.3.0") + androidTestImplementation("androidx.test:rules:1.3.0") + androidTestImplementation("androidx.test.ext:junit:1.1.1") + androidTestImplementation("com.squareup.okhttp3:mockwebserver:4.2.1") + androidTestImplementation("androidx.test:core:1.3.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0") + androidTestImplementation("androidx.test.espresso:espresso-intents:3.4.0") + androidTestImplementation("io.mockk:mockk-android:1.12.1") // Using the same version for simplicity + androidTestImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2") + androidTestImplementation("org.junit.jupiter:junit-jupiter-engine:5.8.2") + androidTestImplementation("org.junit.jupiter:junit-jupiter-params:5.8.2") +} +repositories { + google() + gradlePluginPortal() + jcenter() + mavenCentral() + mavenLocal() + maven("https://jitpack.io") + maven("https://plugins.gradle.org/m2/") } \ No newline at end of file diff --git a/androidApp/src/main/AndroidManifest.xml b/androidApp/src/main/AndroidManifest.xml index 342e230..e7336ff 100644 --- a/androidApp/src/main/AndroidManifest.xml +++ b/androidApp/src/main/AndroidManifest.xml @@ -5,6 +5,9 @@ android:allowBackup="false" android:supportsRtl="true" android:theme="@style/AppTheme"> - + - \ No newline at end of file + + \ No newline at end of file diff --git a/androidApp/src/main/java/com/telnyx/janusmessagesdk/android/MainActivity.kt b/androidApp/src/main/java/com/telnyx/janusmessagesdk/android/MainActivity.kt index 3bb637a..0954590 100644 --- a/androidApp/src/main/java/com/telnyx/janusmessagesdk/android/MainActivity.kt +++ b/androidApp/src/main/java/com/telnyx/janusmessagesdk/android/MainActivity.kt @@ -1,11 +1,25 @@ package com.telnyx.janusmessagesdk.android + import androidx.appcompat.app.AppCompatActivity import android.os.Bundle +import com.telnyx.video.sdk.Room +import com.telnyx.video.sdk.webSocket.model.send.DisplayParameters +import com.telnyx.video.sdk.webSocket.model.send.ExternalData +import java.util.UUID + class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) + val si = DisplayParameters( + participantId = "docendi", + telephonyEngineParticipant = null, + external = null, + stream = null, + canReceiveMessages = null + ) + } } \ No newline at end of file diff --git a/androidApp/src/main/res/values/styles.xml b/androidApp/src/main/res/values/styles.xml index 6b4fa3d..c763bd4 100644 --- a/androidApp/src/main/res/values/styles.xml +++ b/androidApp/src/main/res/values/styles.xml @@ -1,3 +1,3 @@ -