David Liu

update libraries for sample

... ... @@ -46,13 +46,13 @@ nexusStaging {
ext {
androidSdk = [
compileVersion: 29,
targetVersion : 29,
compileVersion: 31,
targetVersion : 31,
minVersion : 21,
]
versions = [
androidx_core : "1.6.0",
androidx_lifecycle: "2.3.1",
androidx_lifecycle: "2.4.0",
dagger : "2.27",
groupie : "2.9.0",
protobuf : "3.15.1",
... ...
... ... @@ -8,13 +8,13 @@ plugins {
}
android {
compileSdkVersion 30
compileSdkVersion androidSdk.compileVersion
buildToolsVersion "30.0.3"
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
minSdkVersion androidSdk.minVersion
targetSdkVersion androidSdk.targetVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
... ...
/build
\ No newline at end of file
... ...
plugins {
id 'com.android.library'
id 'kotlin-android'
}
android {
compileSdk androidSdk.compileVersion
defaultConfig {
minSdk androidSdk.minVersion
targetSdk androidSdk.targetVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
\ No newline at end of file
... ...
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
... ...
package io.livekit.android.sample
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("io.livekit.android.sample", appContext.packageName)
}
}
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<manifest package="io.livekit.android.sample">
</manifest>
\ No newline at end of file
... ...
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="178dp"
android:height="36dp"
android:viewportWidth="178"
android:viewportHeight="36">
<path
android:pathData="M0,0h12v12h-12z"
android:fillColor="#5BBFE4"/>
<path
android:pathData="M0,12h12v12h-12z"
android:fillColor="#4A9EEB"/>
<path
android:pathData="M0,24h12v12h-12z"
android:fillColor="#2D68F3"/>
<path
android:pathData="M12,24h12v12h-12z"
android:fillColor="#4A9EEB"/>
<path
android:pathData="M12,12h12v12h-12z"
android:fillColor="#6EE2E2"/>
<path
android:pathData="M24,0h12v12h-12z"
android:fillColor="#7AFAE1"/>
<path
android:pathData="M24,24h12v12h-12z"
android:fillColor="#5BBFE4"/>
<path
android:pathData="M56,6.812H61.572V25.937H71.592V30.718H56V6.812Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M75.354,12.489H80.82V30.718H75.354V12.489ZM74.879,7.585C74.879,7.198 74.955,6.829 75.107,6.478C75.26,6.126 75.477,5.821 75.758,5.564C76.051,5.294 76.396,5.083 76.795,4.931C77.193,4.778 77.639,4.702 78.131,4.702C78.623,4.702 79.068,4.778 79.467,4.931C79.865,5.083 80.205,5.294 80.486,5.564C80.779,5.821 81.002,6.126 81.154,6.478C81.307,6.829 81.383,7.198 81.383,7.585C81.383,7.983 81.307,8.358 81.154,8.71C81.002,9.05 80.779,9.349 80.486,9.607C80.205,9.864 79.859,10.069 79.449,10.222C79.051,10.374 78.605,10.45 78.113,10.45C77.633,10.45 77.193,10.374 76.795,10.222C76.396,10.069 76.057,9.864 75.775,9.607C75.494,9.337 75.271,9.032 75.107,8.692C74.955,8.341 74.879,7.972 74.879,7.585Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M104.41,12.489L96.764,30.718H91.895L84.266,12.489H90.084L94.303,23.441H94.338L98.574,12.489H104.41Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M105.799,21.612C105.799,20.276 106.045,19.022 106.537,17.851C107.029,16.667 107.721,15.636 108.611,14.757C109.514,13.878 110.58,13.187 111.811,12.683C113.053,12.167 114.424,11.909 115.924,11.909C117.436,11.909 118.812,12.167 120.055,12.683C121.309,13.187 122.381,13.878 123.271,14.757C124.174,15.636 124.871,16.667 125.363,17.851C125.867,19.022 126.119,20.276 126.119,21.612C126.119,21.987 126.102,22.28 126.066,22.491C126.043,22.702 126.014,22.913 125.979,23.124H111.195C111.348,23.698 111.582,24.214 111.898,24.671C112.227,25.128 112.602,25.521 113.023,25.849C113.457,26.165 113.92,26.411 114.412,26.587C114.916,26.763 115.432,26.851 115.959,26.851C116.814,26.851 117.559,26.669 118.191,26.306C118.824,25.942 119.305,25.48 119.633,24.917H125.504C125.234,25.714 124.824,26.499 124.273,27.272C123.723,28.034 123.043,28.714 122.234,29.312C121.426,29.909 120.488,30.39 119.422,30.753C118.367,31.116 117.201,31.298 115.924,31.298C114.436,31.298 113.07,31.046 111.828,30.542C110.586,30.026 109.52,29.329 108.629,28.45C107.738,27.571 107.041,26.546 106.537,25.374C106.045,24.191 105.799,22.937 105.799,21.612ZM115.959,16.216C114.822,16.216 113.861,16.503 113.076,17.077C112.291,17.651 111.723,18.407 111.371,19.345H120.336C119.996,18.419 119.457,17.669 118.719,17.095C117.98,16.509 117.061,16.216 115.959,16.216Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M135.857,18.835L145.104,6.812H151.572L143.188,17.464L151.941,30.718H145.367L139.566,21.56L135.857,26.253V30.718H130.285V6.812H135.857V18.835Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M154.771,12.489H160.238V30.718H154.771V12.489ZM154.297,7.585C154.297,7.198 154.373,6.829 154.525,6.478C154.678,6.126 154.895,5.821 155.176,5.564C155.469,5.294 155.814,5.083 156.213,4.931C156.611,4.778 157.057,4.702 157.549,4.702C158.041,4.702 158.486,4.778 158.885,4.931C159.283,5.083 159.623,5.294 159.904,5.564C160.197,5.821 160.42,6.126 160.572,6.478C160.725,6.829 160.801,7.198 160.801,7.585C160.801,7.983 160.725,8.358 160.572,8.71C160.42,9.05 160.197,9.349 159.904,9.607C159.623,9.864 159.277,10.069 158.867,10.222C158.469,10.374 158.023,10.45 157.531,10.45C157.051,10.45 156.611,10.374 156.213,10.222C155.814,10.069 155.475,9.864 155.193,9.607C154.912,9.337 154.689,9.032 154.525,8.692C154.373,8.341 154.297,7.972 154.297,7.585Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M168.395,7.462L172.297,7.427V12.489H177.588V17.147H172.297V23.546C172.297,24.108 172.361,24.577 172.49,24.952C172.631,25.316 172.812,25.608 173.035,25.831C173.27,26.042 173.545,26.188 173.861,26.271C174.178,26.353 174.518,26.394 174.881,26.394H177.922L177.887,30.841H174.354C173.334,30.841 172.367,30.753 171.453,30.577C170.551,30.39 169.76,30.038 169.08,29.522C168.4,28.995 167.861,28.263 167.463,27.325C167.076,26.376 166.883,25.134 166.883,23.599V17.147H163.982V12.999L166.742,11.944L168.395,7.462Z"
android:fillColor="#ffffff"/>
</vector>
... ...
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="36"
android:viewportHeight="36">
<path
android:fillColor="#5BBFE4"
android:pathData="M0,0h12v12h-12z" />
<path
android:fillColor="#4A9EEB"
android:pathData="M0,12h12v12h-12z" />
<path
android:fillColor="#2D68F3"
android:pathData="M0,24h12v12h-12z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M12,0h12v12h-12z" />
<path
android:fillColor="#4A9EEB"
android:pathData="M12,24h12v12h-12z" />
<path
android:fillColor="#6EE2E2"
android:pathData="M12,12h12v12h-12z" />
<path
android:fillColor="#7AFAE1"
android:pathData="M24,0h12v12h-12z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M24,12h12v12h-12z" />
<path
android:fillColor="#5BBFE4"
android:pathData="M24,24h12v12h-12z" />
</vector>
... ...
... ... @@ -5,12 +5,12 @@ plugins {
}
android {
compileSdkVersion 30
compileSdkVersion androidSdk.compileVersion
defaultConfig {
applicationId "io.livekit.android.composesample"
minSdkVersion 21
targetSdkVersion 30
minSdkVersion androidSdk.minVersion
targetSdkVersion androidSdk.targetVersion
versionCode 1
versionName "1.0"
... ...
... ... @@ -19,7 +19,7 @@ fun <VM> createViewModelFactoryFactory(
create: CreateViewModel<VM>
): ViewModelProvider.Factory {
return object : ViewModelProvider.Factory {
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
@Suppress("UNCHECKED_CAST")
return create() as? T
?: throw IllegalArgumentException("Unknown viewmodel class!")
... ...
... ... @@ -4,12 +4,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
android {
compileSdkVersion 30
compileSdkVersion androidSdk.compileVersion
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "io.livekit.android"
minSdkVersion 21
targetSdkVersion 30
minSdkVersion androidSdk.minVersion
targetSdkVersion androidSdk.targetVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
... ... @@ -36,11 +36,11 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation deps.kotlinx_coroutines
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation "androidx.core:core-ktx:${versions.androidx_core}"
implementation "androidx.activity:activity-ktx:1.2.2"
implementation 'androidx.fragment:fragment-ktx:1.3.2'
implementation "androidx.activity:activity-ktx:1.4.0"
implementation 'androidx.fragment:fragment-ktx:1.3.6'
implementation 'androidx.preference:preference:1.1.1'
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:${versions.androidx_lifecycle}"
... ... @@ -51,6 +51,7 @@ dependencies {
implementation "com.xwray:groupie-viewbinding:${versions.groupie}"
implementation 'com.snakydesign.livedataextensions:lives:1.3.0'
implementation deps.timber
implementation project(":sample-app-common")
implementation project(":livekit-android-sdk")
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
... ...
... ... @@ -14,7 +14,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
... ...
... ... @@ -19,7 +19,7 @@ fun <VM> createViewModelFactoryFactory(
create: CreateViewModel<VM>
): ViewModelProvider.Factory {
return object : ViewModelProvider.Factory {
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
@Suppress("UNCHECKED_CAST")
return create() as? T
?: throw IllegalArgumentException("Unknown viewmodel class!")
... ...
... ... @@ -6,3 +6,4 @@ pluginManagement {
}
include ':sample-app', ':sample-app-compose', ':livekit-android-sdk'
rootProject.name='livekit-android'
include ':sample-app-common'
... ...