Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Aug 22, 2023
2 parents 073275b + d07068e commit c90fcfd
Show file tree
Hide file tree
Showing 79 changed files with 27,757 additions and 30,750 deletions.
19 changes: 0 additions & 19 deletions bash/baseline-profile-amender.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private fun UiDevice.authenticateAndNavigateToHome() {
wait(Until.hasObject(By.res("authenticate")), 5_000)

// Click the Authenticate button and login.
waitForObject(By.res("authenticate")).click()
waitForObject(By.res("authenticate"))?.click()

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

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

waitForIdle()
}

private fun UiDevice.navigateFromLobbyToCall() {
waitForObject(By.text(getPermissionText()), 5_000)?.click()
waitForObject(By.text(getPermissionText()), 5_000)?.click()

wait(Until.hasObject(By.res("call_lobby")), 15_000)
wait(Until.hasObject(By.res("participant_video_renderer")), 15_000)

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

waitForIdle()
}
Expand All @@ -99,10 +102,17 @@ private fun UiDevice.testCall() {
waitForIdle()
}

private fun UiDevice.waitForObject(selector: BySelector, timeout: Long = 5_000): UiObject2 {
private fun UiDevice.waitForObject(selector: BySelector, timeout: Long = 5_000): UiObject2? {
if (wait(Until.hasObject(selector), timeout)) {
return findObject(selector)
}
return null
}

error("Object with selector [$selector] not found")
private fun getPermissionText(): String {
return when {
Build.VERSION.SDK_INT <= 28 -> "ALLOW"
Build.VERSION.SDK_INT == 29 -> "Allow only while using the app"
else -> "While using the app"
}
}
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 = 0
const val minorVersion = 3
const val patchVersion = 1
const val patchVersion = 2
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
const val versionCode = 6
const val versionCode = 7
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
const val artifactGroup = "io.getstream"
const val streamVideoCallGooglePlayVersion = "1.0.0"
Expand Down
2 changes: 2 additions & 0 deletions docusaurus/docs/Android/01-basics/03-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ val call = client.call("default", "123")
val joinResult = call.join(create=true)
```

**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.

`default` is a call type. There are 4 built-in call types and you can also create your own.
The call type controls the permissions and which features are enabled.

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-compose:0.3.1")
implementation("io.getstream:stream-video-android-compose:0.3.2")

// Optionally add Jetpack Compose if Android studio didn't automatically include them
implementation(platform("androidx.compose:compose-bom:2023.06.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-compose:0.3.1")
implementation("io.getstream:stream-video-android-compose:0.3.2")
// Jetpack Compose (optional/ android studio typically adds them when you create a new project)
implementation(platform("androidx.compose:compose-bom:2023.06.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-compose:0.3.1")
implementation("io.getstream:stream-video-android-compose:0.3.2")

// Jetpack Compose (optional/ android studio typically adds them when you create a new project)
implementation(platform("androidx.compose:compose-bom:2023.06.00"))
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/Android/06-advanced/04-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-compose:0.3.1")
implementation("io.getstream:stream-video-android-compose:0.3.2")
// Stream Chat
implementation(libs.stream.chat.compose)
Expand Down
28 changes: 12 additions & 16 deletions docusaurus/docs/Android/06-advanced/08-datastore.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: DataStore
description: Persisting DataStore with the stream-video-android-datastore library.
---

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.
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.
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.

### Usage

Expand All @@ -19,7 +20,12 @@ dependencies {

Now, it's ready to use the datastore.

If you initialized `StreamVideo` with the `StreamVideoBuilder` class, the `StreamUserDataStore`, which contains user information will be installed automatically,
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`).

```kotlin

```

So you can get the instance of the `StreamUserDataStore` like the example below:

```kotlin
Expand Down Expand Up @@ -61,22 +67,12 @@ datastore.updateUserToken(userToken: UserToken)
datastore.updateUserDevice(userDevice: Device?)
```

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.

:::caution
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.
:::
You can also clear the DataStore with `clear()` method.

### Encryption

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:
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:

```kotlin {4}
val client = StreamVideoBuilder(
context = context,
apiKey = apiKey,
encryptPreferences = false, // here
user = user,
token = token,
).build()
```kotlin
StreamUserDataStore.install(context = context, isEncrypted = false)
```
2 changes: 1 addition & 1 deletion dogfooding/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
android:name="io.getstream.video.android.MainActivity"
android:exported="true"
android:theme="@style/Dogfooding"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Loading

0 comments on commit c90fcfd

Please sign in to comment.