JVSession class Session
Located at Jivo.session
Methods
-
clear(
) → Future< void> - Closes current connection, clears the local database, and unsubscribes device from Push Notifications.
-
setContactInfo(
{String? name, String? email, String? phone, String? brief}) → Future< void> - Assigns contact info to user, to reach him easier in future.
-
setCustomData(
List< JVSessionCustomDataField> fields) → Future<void> - Assigns custom data to user, if needed for your business.
-
setPreferredServer(
JVSessionServer server) → Future< void> - Specifies the preferred server for SDK to connect to Jivo.
-
setup(
{required String channelId, required String userToken}) → Future< void> - Sets up a connection between SDK and Jivo, by either creating a new session or resuming existing one.
-
startWatchingUnreadCounter(
Function watcher) → void - Registers the callback that gets called when counter of unread messages gets changed