Skip to content

Commit 706fee1

Browse files
authored
Merge pull request #105 from GetStream/feature/stream-video
Implement a video call feature
2 parents 63b7902 + 9ef795c commit 706fee1

File tree

33 files changed

+559
-30
lines changed

33 files changed

+559
-30
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ build/
1919

2020
# Local configuration file (sdk path, etc)
2121
local.properties
22+
secrets.properties
2223

2324
# Proguard folder generated by Eclipse
2425
proguard/

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ plugins {
2424

2525
android {
2626
namespace = "io.getstream.whatsappclone"
27-
compileSdk = Configurations.compileSdk
2827

2928
defaultConfig {
3029
applicationId = "io.getstream.whatsappclone"
@@ -60,6 +59,7 @@ dependencies {
6059
implementation(project(":features:chats"))
6160
implementation(project(":features:status"))
6261
implementation(project(":features:calls"))
62+
implementation(project(":features:video"))
6363

6464
// material
6565
implementation(libs.androidx.appcompat)

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848

4949
<provider
5050
android:name="androidx.startup.InitializationProvider"
51-
android:authorities="io.getstream.whatsappclone.androidx-startup"
51+
android:authorities="${applicationId}.androidx-startup"
5252
android:exported="false"
5353
tools:node="merge">
5454
<meta-data
55-
android:name="io.getstream.whatsappclone.chats.initializer.StreamChatInitializer"
55+
android:name="io.getstream.whatsappclone.initializer.MainInitializer"
5656
android:value="androidx.startup" />
5757
</provider>
5858
</application>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright 2023 Stream.IO, Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.getstream.whatsappclone.initializer
18+
19+
import android.content.Context
20+
import androidx.startup.Initializer
21+
import io.getstream.whatsappclone.chats.initializer.StreamChatInitializer
22+
import io.getstream.whatsappclone.chats.initializer.StreamLogInitializer
23+
import io.getstream.whatsappclone.video.initializer.StreamVideoInitializer
24+
25+
class MainInitializer : Initializer<Unit> {
26+
27+
override fun create(context: Context) {
28+
}
29+
30+
override fun dependencies(): List<Class<out Initializer<*>>> = listOf(
31+
StreamLogInitializer::class.java,
32+
StreamChatInitializer::class.java,
33+
StreamVideoInitializer::class.java
34+
)
35+
}

app/src/main/kotlin/io/getstream/whatsappclone/navigation/WhatsAppNavigation.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import io.getstream.whatsappclone.chats.messages.WhatsAppMessages
2626
import io.getstream.whatsappclone.model.WhatsAppUser
2727
import io.getstream.whatsappclone.ui.WhatsAppTabPager
2828
import io.getstream.whatsappclone.ui.WhatsAppTopBar
29+
import io.getstream.whatsappclone.video.WhatsAppVideoCall
2930

3031
fun NavGraphBuilder.whatsAppHomeNavigation() {
3132
composable(route = WhatsAppScreens.Home.name) {
@@ -58,4 +59,13 @@ fun NavGraphBuilder.whatsAppHomeNavigation() {
5859
whatsAppUser = whatsAppUser
5960
)
6061
}
62+
63+
composable(
64+
route = WhatsAppScreens.VideoCall.name,
65+
arguments = WhatsAppScreens.VideoCall.navArguments
66+
) {
67+
val callId = it.arguments?.getString(WhatsAppScreens.VideoCall.KEY_CALL_ID) ?: return@composable
68+
69+
WhatsAppVideoCall(id = callId)
70+
}
6171
}

benchmark/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ plugins {
2121

2222
android {
2323
namespace = "io.getstream.whatsappclone.benchmark"
24-
compileSdk = Configurations.compileSdk
24+
compileSdk = 34
2525

2626
compileOptions {
2727
sourceCompatibility = JavaVersion.VERSION_17

build-logic/convention/src/main/kotlin/io/getstream/whatsappclone/KotlinAndroid.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal fun Project.configureKotlinAndroid(
1616
commonExtension: CommonExtension<*, *, *, *, *>,
1717
) {
1818
commonExtension.apply {
19-
compileSdk = 33
19+
compileSdk = 34
2020

2121
defaultConfig {
2222
minSdk = 21

build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ buildscript {
77

88
plugins {
99
alias(libs.plugins.android.application) apply false
10+
alias(libs.plugins.android.library) apply false
11+
alias(libs.plugins.kotlin.android) apply false
1012
alias(libs.plugins.kotlin.jvm) apply false
1113
alias(libs.plugins.kotlin.serialization) apply false
1214
alias(libs.plugins.ksp) apply false
1315
alias(libs.plugins.hilt) apply false
16+
alias(libs.plugins.google.secrets) apply false
1417
alias(libs.plugins.spotless) apply false
1518
}

buildSrc/src/main/kotlin/Configurations.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
object Configurations {
2-
const val compileSdk = 34
32
const val targetSdk = 34
4-
const val minSdk = 21
3+
const val minSdk = 24
54
const val majorVersion = 1
65
const val minorVersion = 0
76
const val patchVersion = 4

core/designsystem/src/main/kotlin/io/getstream/whatsappclone/designsystem/component/WhatsAppLoadingIndicator.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ package io.getstream.whatsappclone.designsystem.component
1818

1919
import androidx.compose.material3.CircularProgressIndicator
2020
import androidx.compose.runtime.Composable
21+
import androidx.compose.ui.Modifier
2122
import io.getstream.whatsappclone.designsystem.theme.GREEN450
2223

2324
@Composable
24-
fun WhatsAppLoadingIndicator() {
25-
CircularProgressIndicator(color = GREEN450)
25+
fun WhatsAppLoadingIndicator(modifier: Modifier = Modifier) {
26+
CircularProgressIndicator(
27+
modifier = modifier,
28+
color = GREEN450
29+
)
2630
}

0 commit comments

Comments
 (0)