David Liu

update libraries for sample

@@ -46,13 +46,13 @@ nexusStaging { @@ -46,13 +46,13 @@ nexusStaging {
46 46
47 ext { 47 ext {
48 androidSdk = [ 48 androidSdk = [
49 - compileVersion: 29,  
50 - targetVersion : 29, 49 + compileVersion: 31,
  50 + targetVersion : 31,
51 minVersion : 21, 51 minVersion : 21,
52 ] 52 ]
53 versions = [ 53 versions = [
54 androidx_core : "1.6.0", 54 androidx_core : "1.6.0",
55 - androidx_lifecycle: "2.3.1", 55 + androidx_lifecycle: "2.4.0",
56 dagger : "2.27", 56 dagger : "2.27",
57 groupie : "2.9.0", 57 groupie : "2.9.0",
58 protobuf : "3.15.1", 58 protobuf : "3.15.1",
@@ -8,13 +8,13 @@ plugins { @@ -8,13 +8,13 @@ plugins {
8 } 8 }
9 9
10 android { 10 android {
11 - compileSdkVersion 30 11 + compileSdkVersion androidSdk.compileVersion
12 buildToolsVersion "30.0.3" 12 buildToolsVersion "30.0.3"
13 13
14 14
15 defaultConfig { 15 defaultConfig {
16 - minSdkVersion 21  
17 - targetSdkVersion 30 16 + minSdkVersion androidSdk.minVersion
  17 + targetSdkVersion androidSdk.targetVersion
18 18
19 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 19 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
20 consumerProguardFiles 'consumer-rules.pro' 20 consumerProguardFiles 'consumer-rules.pro'
  1 +plugins {
  2 + id 'com.android.library'
  3 + id 'kotlin-android'
  4 +}
  5 +
  6 +android {
  7 + compileSdk androidSdk.compileVersion
  8 +
  9 + defaultConfig {
  10 + minSdk androidSdk.minVersion
  11 + targetSdk androidSdk.targetVersion
  12 + versionCode 1
  13 + versionName "1.0"
  14 +
  15 + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  16 + }
  17 +
  18 + buildTypes {
  19 + release {
  20 + minifyEnabled false
  21 + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  22 + }
  23 + }
  24 + compileOptions {
  25 + sourceCompatibility JavaVersion.VERSION_1_8
  26 + targetCompatibility JavaVersion.VERSION_1_8
  27 + }
  28 + kotlinOptions {
  29 + jvmTarget = '1.8'
  30 + }
  31 +}
  32 +
  33 +dependencies {
  34 +
  35 + implementation 'androidx.core:core-ktx:1.7.0'
  36 + implementation 'androidx.appcompat:appcompat:1.3.1'
  37 + implementation 'com.google.android.material:material:1.4.0'
  38 + testImplementation 'junit:junit:4.+'
  39 + androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  40 + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  41 +}
  1 +# Add project specific ProGuard rules here.
  2 +# You can control the set of applied configuration files using the
  3 +# proguardFiles setting in build.gradle.
  4 +#
  5 +# For more details, see
  6 +# http://developer.android.com/guide/developing/tools/proguard.html
  7 +
  8 +# If your project uses WebView with JS, uncomment the following
  9 +# and specify the fully qualified class name to the JavaScript interface
  10 +# class:
  11 +#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  12 +# public *;
  13 +#}
  14 +
  15 +# Uncomment this to preserve the line number information for
  16 +# debugging stack traces.
  17 +#-keepattributes SourceFile,LineNumberTable
  18 +
  19 +# If you keep the line number information, uncomment this to
  20 +# hide the original source file name.
  21 +#-renamesourcefileattribute SourceFile
  1 +package io.livekit.android.sample
  2 +
  3 +import androidx.test.platform.app.InstrumentationRegistry
  4 +import androidx.test.ext.junit.runners.AndroidJUnit4
  5 +
  6 +import org.junit.Test
  7 +import org.junit.runner.RunWith
  8 +
  9 +import org.junit.Assert.*
  10 +
  11 +/**
  12 + * Instrumented test, which will execute on an Android device.
  13 + *
  14 + * See [testing documentation](http://d.android.com/tools/testing).
  15 + */
  16 +@RunWith(AndroidJUnit4::class)
  17 +class ExampleInstrumentedTest {
  18 + @Test
  19 + fun useAppContext() {
  20 + // Context of the app under test.
  21 + val appContext = InstrumentationRegistry.getInstrumentation().targetContext
  22 + assertEquals("io.livekit.android.sample", appContext.packageName)
  23 + }
  24 +}
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<manifest package="io.livekit.android.sample">
  3 +
  4 +
  5 +</manifest>
  1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
  2 + android:width="178dp"
  3 + android:height="36dp"
  4 + android:viewportWidth="178"
  5 + android:viewportHeight="36">
  6 + <path
  7 + android:pathData="M0,0h12v12h-12z"
  8 + android:fillColor="#5BBFE4"/>
  9 + <path
  10 + android:pathData="M0,12h12v12h-12z"
  11 + android:fillColor="#4A9EEB"/>
  12 + <path
  13 + android:pathData="M0,24h12v12h-12z"
  14 + android:fillColor="#2D68F3"/>
  15 + <path
  16 + android:pathData="M12,24h12v12h-12z"
  17 + android:fillColor="#4A9EEB"/>
  18 + <path
  19 + android:pathData="M12,12h12v12h-12z"
  20 + android:fillColor="#6EE2E2"/>
  21 + <path
  22 + android:pathData="M24,0h12v12h-12z"
  23 + android:fillColor="#7AFAE1"/>
  24 + <path
  25 + android:pathData="M24,24h12v12h-12z"
  26 + android:fillColor="#5BBFE4"/>
  27 + <path
  28 + android:pathData="M56,6.812H61.572V25.937H71.592V30.718H56V6.812Z"
  29 + android:fillColor="#ffffff"/>
  30 + <path
  31 + 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"
  32 + android:fillColor="#ffffff"/>
  33 + <path
  34 + android:pathData="M104.41,12.489L96.764,30.718H91.895L84.266,12.489H90.084L94.303,23.441H94.338L98.574,12.489H104.41Z"
  35 + android:fillColor="#ffffff"/>
  36 + <path
  37 + 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"
  38 + android:fillColor="#ffffff"/>
  39 + <path
  40 + 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"
  41 + android:fillColor="#ffffff"/>
  42 + <path
  43 + 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"
  44 + android:fillColor="#ffffff"/>
  45 + <path
  46 + 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"
  47 + android:fillColor="#ffffff"/>
  48 +</vector>
  1 +<vector xmlns:android="http://schemas.android.com/apk/res/android"
  2 + android:width="36dp"
  3 + android:height="36dp"
  4 + android:viewportWidth="36"
  5 + android:viewportHeight="36">
  6 + <path
  7 + android:fillColor="#5BBFE4"
  8 + android:pathData="M0,0h12v12h-12z" />
  9 + <path
  10 + android:fillColor="#4A9EEB"
  11 + android:pathData="M0,12h12v12h-12z" />
  12 + <path
  13 + android:fillColor="#2D68F3"
  14 + android:pathData="M0,24h12v12h-12z" />
  15 + <path
  16 + android:fillColor="#FFFFFF"
  17 + android:pathData="M12,0h12v12h-12z" />
  18 + <path
  19 + android:fillColor="#4A9EEB"
  20 + android:pathData="M12,24h12v12h-12z" />
  21 + <path
  22 + android:fillColor="#6EE2E2"
  23 + android:pathData="M12,12h12v12h-12z" />
  24 + <path
  25 + android:fillColor="#7AFAE1"
  26 + android:pathData="M24,0h12v12h-12z" />
  27 + <path
  28 + android:fillColor="#FFFFFF"
  29 + android:pathData="M24,12h12v12h-12z" />
  30 + <path
  31 + android:fillColor="#5BBFE4"
  32 + android:pathData="M24,24h12v12h-12z" />
  33 +</vector>
@@ -5,12 +5,12 @@ plugins { @@ -5,12 +5,12 @@ plugins {
5 } 5 }
6 6
7 android { 7 android {
8 - compileSdkVersion 30 8 + compileSdkVersion androidSdk.compileVersion
9 9
10 defaultConfig { 10 defaultConfig {
11 applicationId "io.livekit.android.composesample" 11 applicationId "io.livekit.android.composesample"
12 - minSdkVersion 21  
13 - targetSdkVersion 30 12 + minSdkVersion androidSdk.minVersion
  13 + targetSdkVersion androidSdk.targetVersion
14 versionCode 1 14 versionCode 1
15 versionName "1.0" 15 versionName "1.0"
16 16
@@ -19,7 +19,7 @@ fun <VM> createViewModelFactoryFactory( @@ -19,7 +19,7 @@ fun <VM> createViewModelFactoryFactory(
19 create: CreateViewModel<VM> 19 create: CreateViewModel<VM>
20 ): ViewModelProvider.Factory { 20 ): ViewModelProvider.Factory {
21 return object : ViewModelProvider.Factory { 21 return object : ViewModelProvider.Factory {
22 - override fun <T : ViewModel?> create(modelClass: Class<T>): T { 22 + override fun <T : ViewModel> create(modelClass: Class<T>): T {
23 @Suppress("UNCHECKED_CAST") 23 @Suppress("UNCHECKED_CAST")
24 return create() as? T 24 return create() as? T
25 ?: throw IllegalArgumentException("Unknown viewmodel class!") 25 ?: throw IllegalArgumentException("Unknown viewmodel class!")
@@ -4,12 +4,12 @@ apply plugin: 'kotlin-android' @@ -4,12 +4,12 @@ apply plugin: 'kotlin-android'
4 apply plugin: 'kotlin-parcelize' 4 apply plugin: 'kotlin-parcelize'
5 5
6 android { 6 android {
7 - compileSdkVersion 30 7 + compileSdkVersion androidSdk.compileVersion
8 buildToolsVersion "30.0.3" 8 buildToolsVersion "30.0.3"
9 defaultConfig { 9 defaultConfig {
10 applicationId "io.livekit.android" 10 applicationId "io.livekit.android"
11 - minSdkVersion 21  
12 - targetSdkVersion 30 11 + minSdkVersion androidSdk.minVersion
  12 + targetSdkVersion androidSdk.targetVersion
13 versionCode 1 13 versionCode 1
14 versionName "1.0" 14 versionName "1.0"
15 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 15 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -36,11 +36,11 @@ dependencies { @@ -36,11 +36,11 @@ dependencies {
36 implementation fileTree(dir: 'libs', include: ['*.jar']) 36 implementation fileTree(dir: 'libs', include: ['*.jar'])
37 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 37 implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
38 implementation deps.kotlinx_coroutines 38 implementation deps.kotlinx_coroutines
39 - implementation 'com.google.android.material:material:1.3.0'  
40 - implementation 'androidx.appcompat:appcompat:1.2.0' 39 + implementation 'com.google.android.material:material:1.4.0'
  40 + implementation 'androidx.appcompat:appcompat:1.3.1'
41 implementation "androidx.core:core-ktx:${versions.androidx_core}" 41 implementation "androidx.core:core-ktx:${versions.androidx_core}"
42 - implementation "androidx.activity:activity-ktx:1.2.2"  
43 - implementation 'androidx.fragment:fragment-ktx:1.3.2' 42 + implementation "androidx.activity:activity-ktx:1.4.0"
  43 + implementation 'androidx.fragment:fragment-ktx:1.3.6'
44 implementation 'androidx.preference:preference:1.1.1' 44 implementation 'androidx.preference:preference:1.1.1'
45 implementation "androidx.viewpager2:viewpager2:1.0.0" 45 implementation "androidx.viewpager2:viewpager2:1.0.0"
46 implementation "androidx.lifecycle:lifecycle-runtime-ktx:${versions.androidx_lifecycle}" 46 implementation "androidx.lifecycle:lifecycle-runtime-ktx:${versions.androidx_lifecycle}"
@@ -51,6 +51,7 @@ dependencies { @@ -51,6 +51,7 @@ dependencies {
51 implementation "com.xwray:groupie-viewbinding:${versions.groupie}" 51 implementation "com.xwray:groupie-viewbinding:${versions.groupie}"
52 implementation 'com.snakydesign.livedataextensions:lives:1.3.0' 52 implementation 'com.snakydesign.livedataextensions:lives:1.3.0'
53 implementation deps.timber 53 implementation deps.timber
  54 + implementation project(":sample-app-common")
54 implementation project(":livekit-android-sdk") 55 implementation project(":livekit-android-sdk")
55 testImplementation 'junit:junit:4.12' 56 testImplementation 'junit:junit:4.12'
56 androidTestImplementation 'androidx.test.ext:junit:1.1.2' 57 androidTestImplementation 'androidx.test.ext:junit:1.1.2'
@@ -14,7 +14,8 @@ @@ -14,7 +14,8 @@
14 android:roundIcon="@mipmap/ic_launcher_round" 14 android:roundIcon="@mipmap/ic_launcher_round"
15 android:supportsRtl="true" 15 android:supportsRtl="true"
16 android:theme="@style/AppTheme"> 16 android:theme="@style/AppTheme">
17 - <activity android:name=".MainActivity"> 17 + <activity android:name=".MainActivity"
  18 + android:exported="true">
18 <intent-filter> 19 <intent-filter>
19 <action android:name="android.intent.action.MAIN" /> 20 <action android:name="android.intent.action.MAIN" />
20 <category android:name="android.intent.category.LAUNCHER" /> 21 <category android:name="android.intent.category.LAUNCHER" />
@@ -19,7 +19,7 @@ fun <VM> createViewModelFactoryFactory( @@ -19,7 +19,7 @@ fun <VM> createViewModelFactoryFactory(
19 create: CreateViewModel<VM> 19 create: CreateViewModel<VM>
20 ): ViewModelProvider.Factory { 20 ): ViewModelProvider.Factory {
21 return object : ViewModelProvider.Factory { 21 return object : ViewModelProvider.Factory {
22 - override fun <T : ViewModel?> create(modelClass: Class<T>): T { 22 + override fun <T : ViewModel> create(modelClass: Class<T>): T {
23 @Suppress("UNCHECKED_CAST") 23 @Suppress("UNCHECKED_CAST")
24 return create() as? T 24 return create() as? T
25 ?: throw IllegalArgumentException("Unknown viewmodel class!") 25 ?: throw IllegalArgumentException("Unknown viewmodel class!")
@@ -6,3 +6,4 @@ pluginManagement { @@ -6,3 +6,4 @@ pluginManagement {
6 } 6 }
7 include ':sample-app', ':sample-app-compose', ':livekit-android-sdk' 7 include ':sample-app', ':sample-app-compose', ':livekit-android-sdk'
8 rootProject.name='livekit-android' 8 rootProject.name='livekit-android'
  9 +include ':sample-app-common'