Skip to content

Commit c90fcfd

Browse files
committed
Merge branch 'develop'
2 parents 073275b + d07068e commit c90fcfd

File tree

79 files changed

+27757
-30750
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+27757
-30750
lines changed

bash/baseline-profile-amender.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

benchmark/src/main/kotlin/io/getstream/video/android/benchmark/BaselineProfileGenerator.kt

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private fun UiDevice.authenticateAndNavigateToHome() {
6969
wait(Until.hasObject(By.res("authenticate")), 5_000)
7070

7171
// Click the Authenticate button and login.
72-
waitForObject(By.res("authenticate")).click()
72+
waitForObject(By.res("authenticate"))?.click()
7373

7474
waitForIdle()
7575
}
@@ -78,17 +78,20 @@ private fun UiDevice.navigateFromJoinCallToLobby() {
7878
wait(Until.hasObject(By.res("start_new_call")), 5_000)
7979

8080
// wait for the Join Call button and navigate to the lobby screen by clicking.
81-
waitForObject(By.res("start_new_call")).click()
81+
waitForObject(By.res("start_new_call"))?.click()
8282

8383
waitForIdle()
8484
}
8585

8686
private fun UiDevice.navigateFromLobbyToCall() {
87+
waitForObject(By.text(getPermissionText()), 5_000)?.click()
88+
waitForObject(By.text(getPermissionText()), 5_000)?.click()
89+
8790
wait(Until.hasObject(By.res("call_lobby")), 15_000)
8891
wait(Until.hasObject(By.res("participant_video_renderer")), 15_000)
8992

9093
// wait for the Start Call button and navigate to the call screen by clicking.
91-
waitForObject(By.res("start_call"), 15_000).click()
94+
waitForObject(By.res("start_call"), 15_000)?.click()
9295

9396
waitForIdle()
9497
}
@@ -99,10 +102,17 @@ private fun UiDevice.testCall() {
99102
waitForIdle()
100103
}
101104

102-
private fun UiDevice.waitForObject(selector: BySelector, timeout: Long = 5_000): UiObject2 {
105+
private fun UiDevice.waitForObject(selector: BySelector, timeout: Long = 5_000): UiObject2? {
103106
if (wait(Until.hasObject(selector), timeout)) {
104107
return findObject(selector)
105108
}
109+
return null
110+
}
106111

107-
error("Object with selector [$selector] not found")
112+
private fun getPermissionText(): String {
113+
return when {
114+
Build.VERSION.SDK_INT <= 28 -> "ALLOW"
115+
Build.VERSION.SDK_INT == 29 -> "Allow only while using the app"
116+
else -> "While using the app"
117+
}
108118
}

buildSrc/src/main/kotlin/io/getstream/video/android/Configuration.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ object Configuration {
66
const val minSdk = 24
77
const val majorVersion = 0
88
const val minorVersion = 3
9-
const val patchVersion = 1
9+
const val patchVersion = 2
1010
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
11-
const val versionCode = 6
11+
const val versionCode = 7
1212
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
1313
const val artifactGroup = "io.getstream"
1414
const val streamVideoCallGooglePlayVersion = "1.0.0"

docusaurus/docs/Android/01-basics/03-quickstart.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ val call = client.call("default", "123")
2323
val joinResult = call.join(create=true)
2424
```
2525

26+
**Note**: While you can initialise the SDK on-demand and it's not mandatory to initialise the SDK in the `Application.onCreate()` - it is required to initialise it this way for it to be able to handle incoming call and other types of push notifications. In this case the application process will start, the push notification will be delivered to the SDK automatically but the SDK will not be initialised at this point and will ignore the push notification.
27+
2628
`default` is a call type. There are 4 built-in call types and you can also create your own.
2729
The call type controls the permissions and which features are enabled.
2830

docusaurus/docs/Android/02-tutorials/01-video-calling.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If you're new to android, note that there are 2 `build.gradle` files, you want t
3131
```kotlin
3232
dependencies {
3333
// Stream Video Compose SDK
34-
implementation("io.getstream:stream-video-android-compose:0.3.1")
34+
implementation("io.getstream:stream-video-android-compose:0.3.2")
3535

3636
// Optionally add Jetpack Compose if Android studio didn't automatically include them
3737
implementation(platform("androidx.compose:compose-bom:2023.06.00"))

docusaurus/docs/Android/02-tutorials/02-audio-room.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ If you're new to android, note that there are 2 `build.gradle` files, you want t
3535
```groovy
3636
dependencies {
3737
// Stream Video Compose SDK
38-
implementation("io.getstream:stream-video-android-compose:0.3.1")
38+
implementation("io.getstream:stream-video-android-compose:0.3.2")
3939
4040
// Jetpack Compose (optional/ android studio typically adds them when you create a new project)
4141
implementation(platform("androidx.compose:compose-bom:2023.06.00"))

docusaurus/docs/Android/02-tutorials/03-livestream.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ If you're new to android, note that there are 2 `build.gradle` files, you want t
3535
```kotlin
3636
dependencies {
3737
// Stream Video Compose SDK
38-
implementation("io.getstream:stream-video-android-compose:0.3.1")
38+
implementation("io.getstream:stream-video-android-compose:0.3.2")
3939

4040
// Jetpack Compose (optional/ android studio typically adds them when you create a new project)
4141
implementation(platform("androidx.compose:compose-bom:2023.06.00"))

docusaurus/docs/Android/06-advanced/04-chat-with-video.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Let the project sync. It should have all the dependencies required for you to fi
3131
```groovy
3232
dependencies {
3333
// Stream Video Compose SDK
34-
implementation("io.getstream:stream-video-android-compose:0.3.1")
34+
implementation("io.getstream:stream-video-android-compose:0.3.2")
3535
3636
// Stream Chat
3737
implementation(libs.stream.chat.compose)

docusaurus/docs/Android/06-advanced/08-datastore.mdx

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ title: DataStore
33
description: Persisting DataStore with the stream-video-android-datastore library.
44
---
55

6-
Stream SDK uses [DataStore](https://developer.android.com/jetpack/androidx/releases/datastore) to manage user login data safely, consistently, and transactionally. It's used internally by Stream's Core SDK, so you don't need to manage it manually. But if you want to access, trace, or use user login data easily, you can use our **datastore** library.
6+
The `StreamVideoBuilder` requires a valid token and user object to initialise. How this data is managed and stored is the responsibility of the client application.
7+
For convenience the Stream SDK provides a [DataStore](https://developer.android.com/jetpack/androidx/releases/datastore) to manage user login data safely, consistently, and transactionally. The `DataStore` isn't directly connected to the Stream SDK - but the client application can use it to store and retrieve user related data when initialising the Stream SDK.
78

89
### Usage
910

@@ -19,7 +20,12 @@ dependencies {
1920

2021
Now, it's ready to use the datastore.
2122

22-
If you initialized `StreamVideo` with the `StreamVideoBuilder` class, the `StreamUserDataStore`, which contains user information will be installed automatically,
23+
For first use you need to initialise the `StreamUserDataStore` with a context (for example in `Application.onCreate()`) and optionally supply `isEncrypted` parameter (default is `true`).
24+
25+
```kotlin
26+
27+
```
28+
2329
So you can get the instance of the `StreamUserDataStore` like the example below:
2430

2531
```kotlin
@@ -61,22 +67,12 @@ datastore.updateUserToken(userToken: UserToken)
6167
datastore.updateUserDevice(userDevice: Device?)
6268
```
6369

64-
You can also clear the DataStore with `clear()` method. This method is invoked automatically when you call `StreamVideo.logout()` method, so in most cases, you don't need to call this method.
65-
66-
:::caution
67-
Please keep in mind that, DataStore is used by Stream SDK internally, so we don't recommend you update the data in most cases. SDK may work differently than you expected.
68-
:::
70+
You can also clear the DataStore with `clear()` method.
6971

7072
### Encryption
7173

72-
All data stored in `StreamVideoBuilder` are encrypted by default with [Tink](https://github.com/google/tink). But in some reasons, you may not want to use the encryption. In this case, you can disable encryption when you initialize the `StreamVideo` instance like the sample below:
74+
All data stored in `StreamUserDataStore` are encrypted by default with [Tink](https://github.com/google/tink). But in some reasons, you may not want to use the encryption. In this case, you can disable encryption when you install the `StreamUserDataStore` instance like the sample below:
7375

74-
```kotlin {4}
75-
val client = StreamVideoBuilder(
76-
context = context,
77-
apiKey = apiKey,
78-
encryptPreferences = false, // here
79-
user = user,
80-
token = token,
81-
).build()
76+
```kotlin
77+
StreamUserDataStore.install(context = context, isEncrypted = false)
8278
```

dogfooding/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
android:name="io.getstream.video.android.MainActivity"
3939
android:exported="true"
4040
android:theme="@style/Dogfooding"
41-
android:windowSoftInputMode="adjustResize">
41+
android:windowSoftInputMode="adjustPan">
4242
<intent-filter>
4343
<action android:name="android.intent.action.MAIN" />
4444

0 commit comments

Comments
 (0)