Skip to content

Commit

Permalink
Merge branch 'refs/heads/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandar-apostolov committed Jun 26, 2024
2 parents 8e65b33 + 0f8c78c commit 352cb7e
Show file tree
Hide file tree
Showing 77 changed files with 2,052 additions and 199 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ object Configuration {
const val minSdk = 24
const val majorVersion = 1
const val minorVersion = 0
const val patchVersion = 6
const val patchVersion = 7
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
const val versionCode = 30
const val versionCode = 31
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
const val artifactGroup = "io.getstream"
const val streamVideoCallGooglePlayVersion = "1.1.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,49 @@ package io.getstream.video.android.models
import io.getstream.video.android.model.User

public fun User.Companion.builtInUsers(): List<User> {
return listOf<User>(
return listOf(
User(
id = "thierry",
name = "Thierry",
role = "user",
image = "https://getstream.io/static/237f45f28690696ad8fff92726f45106/c59de/thierry.webp",
),
User(
id = "tommaso",
name = "Tommaso",
role = "user",
image = "https://getstream.io/static/712bb5c0bd5ed8d3fa6e5842f6cfbeed/c59de/tommaso.webp",
),
User(
id = "martin",
name = "Martin",
role = "user",
image = "https://getstream.io/static/2796a305dd07651fcceb4721a94f4505/802d2/martin-mitrevski.webp",
),
User(
id = "ilias",
name = "Ilias",
role = "user",
image = "https://getstream.io/static/62cdddcc7759dc8c3ba5b1f67153658c/802d2/ilias-pavlidakis.webp",
),
User(
id = "marcelo",
name = "Marcelo",
role = "user",
image = "https://getstream.io/static/aaf5fb17dcfd0a3dd885f62bd21b325a/802d2/marcelo-pires.webp",
),
User(
id = "alex",
name = "Alex",
role = "user",
image = "https://ca.slack-edge.com/T02RM6X6B-U05UD37MA1G-f062f8b7afc2-512",
),
User(
id = "liviu",
name = "Liviu",
role = "user",
image = "https://ca.slack-edge.com/T02RM6X6B-U0604NCKKRA-76f99b6ba2c8-512",
),
User(
id = "kanat",
name = "Kanat",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private fun CallJoinHeader(
Text(
modifier = Modifier.weight(1f),
color = Color.White,
text = user?.name?.ifBlank { user?.id }?.ifBlank { user!!.custom["email"] }.orEmpty(),
text = user?.userNameOrId.orEmpty(),
maxLines = 1,
fontSize = 16.sp,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package io.getstream.video.android.ui.login

import android.app.Activity
import android.content.Intent
import androidx.activity.ComponentActivity
import androidx.activity.compose.ManagedActivityResultLauncher
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.ActivityResult
Expand All @@ -36,7 +36,7 @@ fun rememberRegisterForActivityResult(
return rememberLauncherForActivityResult(
ActivityResultContracts.StartActivityForResult(),
) { result ->
if (result.resultCode != ComponentActivity.RESULT_OK) {
if (result.resultCode != Activity.RESULT_OK) {
onSignInFailed.invoke()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package io.getstream.video.android.ui.login

import android.app.Activity
import android.content.Intent
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.ManagedActivityResultLauncher
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.ActivityResult
Expand All @@ -39,7 +39,7 @@ fun rememberLauncherForGoogleSignInActivityResult(
) { result ->
Log.d("Google Sign In", "Checking activity result")

if (result.resultCode != ComponentActivity.RESULT_OK) {
if (result.resultCode != Activity.RESULT_OK) {
Log.d("Google Sign In", "Failed with result not OK: ${result.resultCode}")
onSignInFailed()
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ private fun BuiltInUsersLoginDialog(
Spacer(modifier = Modifier.width(16.dp))
Text(
modifier = Modifier.align(Alignment.CenterVertically),
text = user.name,
text = user.name.orEmpty(),
color = VideoTheme.colors.basePrimary,
style = VideoTheme.typography.subtitleS,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private fun Header(user: User?) {
Text(
modifier = Modifier.weight(1f),
color = Color.White,
text = user?.name?.ifBlank { user.id }?.ifBlank { user.custom["email"] }.orEmpty(),
text = user?.userNameOrId ?: "",
maxLines = 1,
fontSize = 16.sp,
)
Expand Down Expand Up @@ -215,7 +215,7 @@ private fun UserList(entries: List<UserUiState>, onUserClick: (Int) -> Unit) {
with(entries[index]) {
UserRow(
index = index,
name = user.name,
name = user.name.orEmpty(),
avatarUrl = user.image,
isSelected = isSelected,
onClick = { onUserClick(index) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package io.getstream.video.android.util

import android.app.Activity
import android.util.Log
import android.widget.Toast
import androidx.activity.ComponentActivity
Expand Down Expand Up @@ -87,11 +88,11 @@ class InAppUpdateHelper(private val activity: ComponentActivity) {
when (resultCode) {
// For immediate updates, you might not receive RESULT_OK because
// the update should already be finished by the time control is given back to your app.
ComponentActivity.RESULT_OK -> {
Activity.RESULT_OK -> {
Log.d(IN_APP_UPDATE_LOG_TAG, "Update successful")
showToast(activity.getString(R.string.in_app_update_successful))
}
ComponentActivity.RESULT_CANCELED -> {
Activity.RESULT_CANCELED -> {
Log.d(IN_APP_UPDATE_LOG_TAG, "Update canceled")
showToast(activity.getString(R.string.in_app_update_canceled))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ object StreamVideoInitHelper {

val chatUser = io.getstream.chat.android.models.User(
id = user.id,
name = user.name,
image = user.image,
name = user.name.orEmpty(),
image = user.image.orEmpty(),
)

chatClient.connectUser(
Expand Down Expand Up @@ -199,7 +199,7 @@ object StreamVideoInitHelper {
),
),
tokenProvider = {
val email = user.custom["email"]
val email = user.custom?.get("email")
val authData = StreamService.instance.getAuthData(
environment = AppConfig.currentEnvironment.value!!.env,
userId = email,
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/Android/02-tutorials/01-video-calling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If you're new to android, note that there are 2 `build.gradle` files, you want t
```kotlin
dependencies {
// Stream Video Compose SDK
implementation("io.getstream:stream-video-android-ui-compose:1.0.5")
implementation("io.getstream:stream-video-android-ui-compose:1.0.7")

// Optionally add Jetpack Compose if Android studio didn't automatically include them
implementation(platform("androidx.compose:compose-bom:2023.08.00"))
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/Android/02-tutorials/02-audio-room.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If you're new to android, note that there are 2 `build.gradle` files, you want t
```groovy
dependencies {
// Stream Video Compose SDK
implementation("io.getstream:stream-video-android-ui-compose:1.0.5")
implementation("io.getstream:stream-video-android-ui-compose:1.0.7")
// Jetpack Compose (optional/ android studio typically adds them when you create a new project)
implementation(platform("androidx.compose:compose-bom:2023.08.00"))
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/Android/02-tutorials/03-livestream.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If you're new to android, note that there are 2 `build.gradle` files, you want t
```kotlin
dependencies {
// Stream Video Compose SDK
implementation("io.getstream:stream-video-android-ui-compose:1.0.5")
implementation("io.getstream:stream-video-android-ui-compose:1.0.7")

// Jetpack Compose (optional/ android studio typically adds them when you create a new project)
implementation(platform("androidx.compose:compose-bom:2023.08.00"))
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/Android/06-advanced/07-chat-with-video.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Let the project sync. It should have all the dependencies required for you to fi
```groovy
dependencies {
// Stream Video Compose SDK
implementation("io.getstream:stream-video-android-ui-compose:1.0.5")
implementation("io.getstream:stream-video-android-ui-compose:1.0.7")
// Stream Chat
implementation(libs.stream.chat.compose)
Expand Down
1 change: 1 addition & 0 deletions docusaurus/docusaurus
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ androidxCore = "1.12.0"
androidxAnnotation = "1.7.1"
androidxLifecycle = "2.7.0"
androidxStartup = "1.1.1"
androidxActivity = "1.8.2"
androidxActivity = "1.9.0"
androidxDataStore = "1.0.0"
googleService = "4.3.14"

Expand Down Expand Up @@ -64,7 +64,7 @@ junit = "4.13.2"
truth = "1.1.3"
mockk = "1.13.4"
kotlinTestJunit = "1.8.20"
firebaseBom = "32.5.0"
firebaseBom = "33.1.0"
firebaseCrashlytics = "2.9.5"

installReferrer = "2.2"
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ include(":stream-video-android-bom")
include(":tutorials:tutorial-video")
include(":tutorials:tutorial-audio")
include(":tutorials:tutorial-livestream")
include(":tutorials:tutorial-ringing")

buildCache {
local {
Expand Down
Loading

0 comments on commit 352cb7e

Please sign in to comment.