LocalzChatMyWaySDK

class LocalzChatMyWaySDK(useMemoryCache: Boolean)

The main entry point for the Localz Chat My Way SDK.

This SDK provides functionality for real-time chat communication, including:

  • Configuring the SDK

  • Managing chat channels

  • Sending and receiving messages

  • Handling push notifications

Constructors

Link copied to clipboard
constructor(useMemoryCache: Boolean)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun cancel()

Cancels ongoing operations and stops the channel service.

Link copied to clipboard

Provides a real-time flow of ChatChannels for the current user.

Link copied to clipboard

Provides a real-time flow of ChatEvents.

Link copied to clipboard
fun configure(localzSdkKey: LocalzSdkKey, environment: LocalzEnvironment = LocalzEnvironment.PROD)

Configures the SDK with the given SDK key and environment.

fun configure(localzSdkKey: String, environment: LocalzEnvironment = LocalzEnvironment.PROD)

Configures the SDK with the given SDK key string and environment.

Link copied to clipboard

Provides a real-time flow of Messages for the given channelId.

Link copied to clipboard

Provides a real-time flow of Contacts for the current user.

Link copied to clipboard
suspend fun handleFirebasePush(remoteMessageData: Map<String, String>)

Enables the SDK to respond to relevant Firebase notifications required for real-time updates of ChatChannels.

Link copied to clipboard

Provides a flow of LogReports for monitoring and debugging purposes.

Link copied to clipboard
suspend fun sendMessageByOrder(orderNumber: String, subProjectId: String?, content: String)

Sends a Message to a three-way ChatChannel.Order conversation.

Link copied to clipboard
suspend fun sendMessageByRouteStopId(routeId: String, stopId: String, content: String)

Sends a Message to a three-way ChatChannel.Stop conversation.

Link copied to clipboard
suspend fun sendMessageBySite(siteId: String, content: String)

Sends a Message to a two-way ChatChannel.Site conversation.

Link copied to clipboard
suspend fun setup(username: String)

Sets up the SDK for the given username.

Link copied to clipboard
suspend fun updateLastSeen(channelId: String): LocalzResult<Unit>

Updates the driver last seen status for a specific channel.