Companion

object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Sentinel value assigned to Client.dbPath when the client was created via createInMemory. No file exists at this path.

Link copied to clipboard

Process-wide control for automatic stream-lifecycle management. When true (the default), the first Client created registers a androidx.lifecycle.ProcessLifecycleOwner observer that parks the shared streaming wire while the app is backgrounded and revives it on foreground. The streaming wire is shared across every client in the process, so this is a process-global setting, not per-client: set it to false before creating your first client to opt out (e.g. to manage the lifecycle yourself).

Functions

Link copied to clipboard
fun activatePersistentLibXMTPLogWriter(appContext: Context, logLevel: FfiLogLevel, rotationSchedule: FfiLogRotation, maxFiles: Int, processType: ProcessType = FfiProcessType.MAIN)
Link copied to clipboard
suspend fun build(publicIdentity: PublicIdentity, options: ClientOptions, inboxId: InboxId? = null): Client
Link copied to clipboard
suspend fun canMessage(identities: List<PublicIdentity>, api: ClientOptions.Api): Map<String, Boolean>
Link copied to clipboard
fun clearXMTPLogs(appContext: Context): Int
Link copied to clipboard
suspend fun connectToApiBackend(api: ClientOptions.Api): XmtpApiClient
Link copied to clipboard
suspend fun create(account: SigningKey, options: ClientOptions): Client
Link copied to clipboard
suspend fun createInMemory(account: SigningKey, options: ClientOptions): Client

Creates a Client backed by an in-memory SQLCipher database.

Link copied to clipboard
suspend fun fetchServerConfiguration(backendUrl: String, appVersion: String? = null): ServerConfiguration

Read a deployment's configuration with no database, no client, and no credential (spec 006 CFG-081).

Link copied to clipboard
suspend fun ffiApplySignatureRequest(api: ClientOptions.Api, signatureRequest: SignatureRequest)
Link copied to clipboard
suspend fun ffiCreateClient(publicIdentity: PublicIdentity, clientOptions: ClientOptions): Client
Link copied to clipboard
suspend fun ffiRevokeInstallations(api: ClientOptions.Api, publicIdentity: PublicIdentity, inboxId: InboxId, installationIds: List<String>): SignatureRequest
Link copied to clipboard
Link copied to clipboard
suspend fun getOrCreateInboxId(api: ClientOptions.Api, publicIdentity: PublicIdentity): InboxId
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun keyPackageStatusesForInstallationIds(installationIds: List<String>, api: ClientOptions.Api): Map<String, FfiKeyPackageStatus>
Link copied to clipboard
fun register(codec: ContentCodec<*>)
Link copied to clipboard
suspend fun revokeInstallations(api: ClientOptions.Api, signingKey: SigningKey, inboxId: InboxId, installationIds: List<String>)
Link copied to clipboard
fun setLibXMTPNativeLogLevel(logLevel: FfiLogLevel)

Sets the log level for the native log layer (logcat on Android). Use FfiLogLevel.TRACE to capture span/activity events. Independent of the persistent file log writer.