Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Feb 26, 2024
2 parents 5c952f7 + b98ed79 commit 711234d
Show file tree
Hide file tree
Showing 811 changed files with 9,519 additions and 5,072 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Stream provides UI components and state handling that make it easy to build vide

With Stream's video components, you can use their SDK to build in-app video calling, audio rooms, audio calls, or live streaming. The best place to get started is with their tutorials:

- **[Video & Audio Calling Tutorial](https://getstream.io/video/docs/android/tutorials/video-calling/)**
- **[Audio Rooms Tutorial](https://getstream.io/video/docs/android/tutorials/audio-room/)**
- **[Livestreaming Tutorial](https://getstream.io/video/docs/android/tutorials/livestream/)**
- **[Video & Audio Calling Tutorial](https://getstream.io/video/docs/android/tutorials/video-calling?utm_source=Github&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Github_Android_Video_SDK&utm_term=DevRelOss)**
- **[Audio Rooms Tutorial](https://getstream.io/video/docs/android/tutorials/audio-room?utm_source=Github&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Github_Android_Video_SDK&utm_term=DevRelOss)**
- **[Livestreaming Tutorial](https://getstream.io/video/docs/android/tutorials/livestream?utm_source=Github&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Github_Android_Video_SDK&utm_term=DevRelOss)**

If you're interested in customizing the UI components for the Video SDK, check out the **[UI Cookbook](https://getstream.io/video/docs/android/ui-cookbook/overview/)**.
If you're interested in customizing the UI components for the Video SDK, check out the **[UI Cookbook](https://getstream.io/video/docs/android/ui-cookbook/overview?utm_source=Github&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Github_Android_Video_SDK&utm_term=DevRelOss)**.

## 📱 Previews

Expand All @@ -43,7 +43,7 @@ If you're interested in customizing the UI components for the Video SDK, check o

You can find sample projects below that demonstrates use cases of Stream Video SDK for Android:

- [Dogfooding](https://github.com/GetStream/stream-video-android/tree/develop/dogfooding): Dogfooding demonstrates Stream Video SDK for Android with modern Android tech stacks, such as Compose, Hilt, and Coroutines.
- [Demo App](https://github.com/GetStream/stream-video-android/tree/develop/demo-app): Demo App demonstrates Stream Video SDK for Android with modern Android tech stacks, such as Compose, Hilt, and Coroutines.
- [WhatsApp Clone Compose](https://github.com/getstream/whatsapp-clone-compose): WhatsApp clone project demonstrates modern Android development built with Jetpack Compose and Stream Chat/Video SDK for Compose.
- [Twitch Clone Compose](https://github.com/skydoves/twitch-clone-compose): Twitch clone project demonstrates modern Android development built with Jetpack Compose and Stream Chat/Video SDK for Compose.
- [Meeting Room Compose](https://github.com/GetStream/meeting-room-compose): A real-time meeting room app built with Jetpack Compose to demonstrate video communications.
Expand Down Expand Up @@ -169,7 +169,7 @@ Check out our current openings and apply via [Stream's website](https://getstrea
## License

```
Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
Licensed under the Stream License;
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion benchmark/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2023 Stream.io Inc. All rights reserved.
Copyright (c) 2024 Stream.io Inc. All rights reserved.
Licensed under the Stream License;
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2022 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2022 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2022 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
24 changes: 12 additions & 12 deletions demo-app/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dogfooding App
# Demo App

Dogfooding demonstrates Stream Video SDK for Android with modern Android tech stacks, such as Compose, Hilt, and Coroutines.
Demo demonstrates Stream Video SDK for Android with modern Android tech stacks, such as Compose, Hilt, and Coroutines.

## 📱 Previews

Expand All @@ -12,11 +12,11 @@ Dogfooding demonstrates Stream Video SDK for Android with modern Android tech st

## Download

Dogfooding app is available on **[Google Play](https://play.google.com/store/apps/details?id=io.getstream.video.android)**. If you have any feedback on this, please [create an issue on GitHub](https://github.com/GetStream/stream-video-android/issues/new/choose).
Demo app is available on **[Google Play](https://play.google.com/store/apps/details?id=io.getstream.video.android)**. If you have any feedback on this, please [create an issue on GitHub](https://github.com/GetStream/stream-video-android/issues/new/choose).

## Build Setup

If you want to build and run the [dogfooding app](https://github.com/GetStream/stream-video-android/tree/develop/dogfooding) on your computer, you can follow the instructions below:
If you want to build and run the [demo app](https://github.com/GetStream/stream-video-android/tree/develop/demo-app) on your computer, you can follow the instructions below:

1. Get your Stream API KEY on the [Stream dashboard](https://dashboard.getstream.io?utm_source=Github&utm_medium=DevRel_GitHub_Repo_Jaewoong&utm_content=Developer&utm_campaign=Github_Sep2023_Jaewoong_StreamVideoSDK&utm_term=DevRelOss).

Expand All @@ -43,24 +43,24 @@ If you want to build and run the [dogfooding app](https://github.com/GetStream/s

</details>

2. Next, create a file named **.env.properties** on the root project with the formats below:
7. Next, create a file named **.env.properties** on the root project with the formats below:

```
# Environment Variable for dogfooding app
DOGFOODING_RES_CONFIG_DEEPLINKING_HOST=pronto.getstream.io
DOGFOODING_RES_CONFIG_DEEPLINKING_HOST_LEGACY=stream-calls-dogfood.vercel.app
DOGFOODING_BUILD_CONFIG_API_KEY=YOUR_API_KEY
DOGFOODING_BUILD_CONFIG_BENCHMARK=true
DOGFOODING_RES_CONFIG_DEEPLINKING_HOST=stream-calls-dogfood.vercel.app
DOGFOODING_RES_CONFIG_DEEPLINKING_PATH_PREFIX=/
PRODUCTION_RES_CONFIG_DEEPLINKING_HOST=getstream.io
PRODUCTION_RES_CONFIG_DEEPLINKING_HOST_LEGACY=
PRODUCTION_RES_CONFIG_DEEPLINKING_PATH_PREFIX=/video/demos/
```

3. Finally, run the dogfooding project on your Android Studio.
Make sure that you properly copy-pasted the Stream API key to the `DOGFOODING_BUILD_CONFIG_API_KEY` property.

8. Finally, run the demo project on your Android Studio.

## License

```
Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
Licensed under the Stream License;
you may not use this file except in compliance with the License.
Expand Down
5 changes: 4 additions & 1 deletion demo-app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -269,6 +269,9 @@ dependencies {
implementation(libs.google.mlkit.selfie.segmentation)
implementation(files("libs/renderscript-toolkit.aar"))

// Http
implementation(libs.okhttp)

// Memory detection
debugImplementation(libs.leakCanary)

Expand Down
2 changes: 1 addition & 1 deletion demo-app/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2023 Stream.io Inc. All rights reserved.
Copyright (c) 2024 Stream.io Inc. All rights reserved.
Licensed under the Stream License;
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2023 Stream.io Inc. All rights reserved.
Copyright (c) 2024 Stream.io Inc. All rights reserved.
Licensed under the Stream License;
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion demo-app/src/development/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2023 Stream.io Inc. All rights reserved.
Copyright (c) 2024 Stream.io Inc. All rights reserved.
Licensed under the Stream License;
you may not use this file except in compliance with the License.
Expand Down
6 changes: 5 additions & 1 deletion demo-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2023 Stream.io Inc. All rights reserved.
Copyright (c) 2024 Stream.io Inc. All rights reserved.
Licensed under the Stream License;
you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,8 @@
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<!-- For Android < 10 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />
Expand Down Expand Up @@ -89,6 +91,8 @@
<data android:scheme="https" />
<data android:host="getstream.io" />
<data android:host="pronto.getstream.io" />
<data android:host="staging.getstream.io" />
<data android:host="stream-calls-dogfood.vercel.app"/>
<data android:pathPrefix="/join" />
<data android:pathPrefix="/video/demos/join" />
</intent-filter>
Expand Down
2 changes: 1 addition & 1 deletion demo-app/src/main/kotlin/io/getstream/video/android/App.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2022 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2022 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,14 +36,15 @@ import dagger.hilt.android.AndroidEntryPoint
import io.getstream.android.push.permissions.NotificationPermissionManager
import io.getstream.android.push.permissions.NotificationPermissionStatus
import io.getstream.log.taggedLogger
import io.getstream.video.android.compose.theme.VideoTheme
import io.getstream.video.android.compose.theme.base.VideoTheme
import io.getstream.video.android.core.StreamVideo
import io.getstream.video.android.datastore.delegate.StreamUserDataStore
import io.getstream.video.android.model.StreamCallId
import io.getstream.video.android.ui.call.CallActivity
import io.getstream.video.android.ui.theme.Colors
import io.getstream.video.android.util.InitializedState
import io.getstream.video.android.util.StreamVideoInitHelper
import io.getstream.video.android.util.config.AppConfig
import io.getstream.video.android.util.config.AppConfig.fromUri
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import javax.inject.Inject
Expand All @@ -65,11 +66,11 @@ class DeeplinkingActivity : ComponentActivity() {
Box(
modifier = Modifier
.fillMaxSize()
.background(Colors.background),
.background(VideoTheme.colors.baseSheetPrimary),
) {
CircularProgressIndicator(
modifier = Modifier.align(Alignment.Center),
color = VideoTheme.colors.primaryAccent,
color = VideoTheme.colors.brandPrimary,
)
}
}
Expand Down Expand Up @@ -106,7 +107,7 @@ class DeeplinkingActivity : ComponentActivity() {
) == PackageManager.PERMISSION_GRANTED
) {
// ensure that audio & video permissions are granted
joinCall(callId)
joinCall(data, callId)
} else {
// first ask for push notification permission
val manager = NotificationPermissionManager.createNotificationPermissionsManager(
Expand All @@ -115,7 +116,7 @@ class DeeplinkingActivity : ComponentActivity() {
onPermissionStatus = {
// we don't care about the result for demo purposes
if (it != NotificationPermissionStatus.REQUESTED) {
joinCall(callId)
joinCall(data, callId)
}
},
)
Expand Down Expand Up @@ -158,11 +159,17 @@ class DeeplinkingActivity : ComponentActivity() {
return callId ?: data.getQueryParameter("id")
}

private fun joinCall(cid: String) {
private fun joinCall(data: Uri?, cid: String) {
lifecycleScope.launch {
data?.let {
val determinedEnv = AppConfig.availableEnvironments.fromUri(it)
determinedEnv?.let {
AppConfig.selectEnv(determinedEnv)
}
}
// Deep link can be opened without the app after install - there is no user yet
// But in this case the StreamVideoInitHelper will use a random account
StreamVideoInitHelper.loadSdk(
StreamVideoInitHelper.reloadSdk(
dataStore = dataStore,
useRandomUserAsFallback = true,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2022 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,7 +28,7 @@ import androidx.compose.ui.Modifier
import androidx.lifecycle.lifecycleScope
import dagger.hilt.android.AndroidEntryPoint
import io.getstream.result.Result
import io.getstream.video.android.compose.theme.VideoTheme
import io.getstream.video.android.compose.theme.base.VideoTheme
import io.getstream.video.android.compose.ui.components.call.ringing.RingingCallContent
import io.getstream.video.android.core.Call
import io.getstream.video.android.core.StreamVideo
Expand Down Expand Up @@ -143,7 +143,7 @@ class DirectCallActivity : ComponentActivity() {
}

RingingCallContent(
modifier = Modifier.background(color = VideoTheme.colors.appBackground),
modifier = Modifier.background(color = VideoTheme.colors.baseSheetPrimary),
call = call,
onBackPressed = {
reject(call)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2022 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,7 +29,7 @@ import androidx.compose.ui.Modifier
import androidx.lifecycle.lifecycleScope
import dagger.hilt.android.AndroidEntryPoint
import io.getstream.result.Result
import io.getstream.video.android.compose.theme.VideoTheme
import io.getstream.video.android.compose.theme.base.VideoTheme
import io.getstream.video.android.compose.ui.components.call.ringing.RingingCallContent
import io.getstream.video.android.core.StreamVideo
import io.getstream.video.android.core.call.state.AcceptCall
Expand Down Expand Up @@ -121,7 +121,7 @@ class IncomingCallActivity : ComponentActivity() {
}
}
RingingCallContent(
modifier = Modifier.background(color = VideoTheme.colors.appBackground),
modifier = Modifier.background(color = VideoTheme.colors.baseSheetPrimary),
call = call,
onBackPressed = {
call.leave()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,7 @@ import androidx.lifecycle.repeatOnLifecycle
import com.google.firebase.analytics.FirebaseAnalytics
import dagger.hilt.android.AndroidEntryPoint
import io.getstream.video.android.analytics.FirebaseEvents
import io.getstream.video.android.compose.theme.VideoTheme
import io.getstream.video.android.compose.theme.base.VideoTheme
import io.getstream.video.android.datastore.delegate.StreamUserDataStore
import io.getstream.video.android.tooling.util.StreamFlavors
import io.getstream.video.android.ui.AppNavHost
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
* Copyright (c) 2014-2024 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 711234d

Please sign in to comment.