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: README.md
+34-22
Original file line number
Diff line number
Diff line change
@@ -252,7 +252,38 @@ val decodedConversation = containerAgain.decode(client)
252
252
decodedConversation.send(text ="hi")
253
253
```
254
254
255
-
### Handle different types of content
255
+
### Cache conversations
256
+
257
+
As a performance optimization, you may want to persist the list of conversations in your application outside of the SDK to speed up the first call to `client.conversations.list()`.
258
+
259
+
The exported conversation list contains encryption keys for any V2 conversations included in the list. As such, you should treat it with the same care that you treat private keys.
260
+
261
+
You can get a JSON serializable list of conversations by calling:
The user consent feature enables your app to request and respect user consent preferences. With this feature, another blockchain account address registered on the XMTP network can have one of three consent preference values:
279
+
280
+
- Unknown
281
+
- Allowed
282
+
- Denied
283
+
284
+
To learn more, see [Request and respect user consent](https://xmtp.org/docs/build/user-consent).
285
+
286
+
## Handle different types of content
256
287
257
288
All the send functions support `SendOptions` as an optional parameter. The `contentType` option allows specifying different types of content than the default simple string, which is identified with content type identifier `ContentTypeText`.
258
289
@@ -274,11 +305,11 @@ As shown in the example above, you must provide a `contentFallback` value. Use i
274
305
> **Caution**
275
306
> If you don't provide a `contentFallback` value, clients that don't support the content type will display an empty message. This results in a poor user experience and breaks interoperability.
276
307
277
-
####Handle custom content types
308
+
### Handle custom content types
278
309
279
310
Beyond this, custom codecs and content types may be proposed as interoperable standards through XRCs. To learn more about the custom content type proposal process, see [XIP-5](https://github.com/xmtp/XIPs/blob/main/XIPs/xip-5-message-content-types.md).
280
311
281
-
###Compression
312
+
## Compression
282
313
283
314
Message content can be optionally compressed using the compression option. The value of the option is the name of the compression algorithm to use. Currently supported are gzip and deflate. Compression is applied to the bytes produced by the content codec.
284
315
@@ -288,25 +319,6 @@ Content will be decompressed transparently on the receiving end. Note that Clien
As a performance optimization, you may want to persist the list of conversations in your application outside of the SDK to speed up the first call to `client.conversations.list()`.
294
-
295
-
The exported conversation list contains encryption keys for any V2 conversations included in the list. As such, you should treat it with the same care that you treat private keys.
296
-
297
-
You can get a JSON serializable list of conversations by calling:
// To load the conversations in a new SDK instance you can run:
304
-
305
-
val client =Client.create(wallet)
306
-
val conversations =JSON.parse(loadConversationsFromSomewhere())
307
-
val client.importConversation(conversations)
308
-
```
309
-
310
322
## 🏗 Breaking revisions
311
323
312
324
Because `xmtp-android` is in active development, you should expect breaking revisions that might require you to adopt the latest SDK release to enable your app to continue working as expected.
0 commit comments