You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docusaurus/docs/Android/01-basics/03-quickstart.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,8 @@ val call = client.call("default", "123")
23
23
val joinResult = call.join(create=true)
24
24
```
25
25
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
+
26
28
`default` is a call type. There are 4 built-in call types and you can also create your own.
27
29
The call type controls the permissions and which features are enabled.
Copy file name to clipboardExpand all lines: docusaurus/docs/Android/06-advanced/08-datastore.mdx
+12-16Lines changed: 12 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@ title: DataStore
3
3
description: Persisting DataStore with the stream-video-android-datastore library.
4
4
---
5
5
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.
7
8
8
9
### Usage
9
10
@@ -19,7 +20,12 @@ dependencies {
19
20
20
21
Now, it's ready to use the datastore.
21
22
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
+
23
29
So you can get the instance of the `StreamUserDataStore` like the example below:
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.
69
71
70
72
### Encryption
71
73
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:
0 commit comments