-
public final class HubspotManagerHubspotManager class enable and disable logs @see enableLogs & @seedisableLogs It manages the configuration changes from the assets file @see configure It also builds chatURL @see chatUrl It stores the email and token in memory @see setUserIdentity It sets chat properties for chat session @see getChatProperties & @see setChatProperties It sends the PushToken to Hubspot API @see setPushToken
-
-
Field Summary
Fields Modifier and Type Field Description private final StringuserIdentityEmailprivate final StringuserIdentityToken
-
Method Summary
Modifier and Type Method Description final StringgetUserIdentityEmail()final StringgetUserIdentityToken()final UnitstartChat()Shares the logs with chat started final UnitenableLogs()Enable the logs final UnitdisableLogs()Disable the logs final Unitconfigure()It creates Hubspot configurations When user uses the demo app, it always call this method to configure with the hubspot sdk. final UnitsetUserIdentity(String email, String token)Set the user identity token and email. final StringchatURL(String chatFlow, PushNotificationChatData pushData)Create chat URL for hubspot webview final Unitlogout()final UnitsetChatProperties(Map<String, String> keyValuePair)Sets properties for current chat session final <ERROR CLASS><String, String>getChatProperties()Getter method for the current chat session properties final <ERROR CLASS>getPortalId()Getter method for hubspot portal id final <ERROR CLASS>getHublet()Getter method for hubspot Hublet final <ERROR CLASS>getEnvironment()Getter method for hubspot Environment final <ERROR CLASS>getDefaultChatFlow()Getter method for hubspot DefaultChatFlow final UnitsetPushToken(String pushToken)This method is used for sending the token via Hubspot API final StringgetPushToken()This method is used for getting a PushToken from the shared preferences final UnitdeleteDeviceToken(String pushToken)This method is used for deleting the push token via Hubspot API -
-
Method Detail
-
getUserIdentityEmail
final String getUserIdentityEmail()
-
getUserIdentityToken
final String getUserIdentityToken()
-
enableLogs
final Unit enableLogs()
Enable the logs
-
disableLogs
final Unit disableLogs()
Disable the logs
-
configure
final Unit configure()
It creates Hubspot configurations When user uses the demo app, it always call this method to configure with the hubspot sdk. This is the only method which is handled by the application.
-
setUserIdentity
final Unit setUserIdentity(String email, String token)
Set the user identity token and email. These will be included when starting a chat session to identify the users. These values are only stored in memory and aren't persisted. These values are set when user use the setUserIdentity with passing email and token
- Parameters:
email- : The users email address, that matches the token.token- : The token from the identity api.
-
chatURL
final String chatURL(String chatFlow, PushNotificationChatData pushData)
Create chat URL for hubspot webview
-
setChatProperties
final Unit setChatProperties(Map<String, String> keyValuePair)
Sets properties for current chat session
- Parameters:
keyValuePair- Property key value pairs
-
getChatProperties
final <ERROR CLASS><String, String> getChatProperties()
Getter method for the current chat session properties
-
getPortalId
final <ERROR CLASS> getPortalId()
Getter method for hubspot portal id
-
getHublet
final <ERROR CLASS> getHublet()
Getter method for hubspot Hublet
-
getEnvironment
final <ERROR CLASS> getEnvironment()
Getter method for hubspot Environment
-
getDefaultChatFlow
final <ERROR CLASS> getDefaultChatFlow()
Getter method for hubspot DefaultChatFlow
-
setPushToken
final Unit setPushToken(String pushToken)
This method is used for sending the token via Hubspot API
- Parameters:
pushToken- : It has FCM token
-
getPushToken
final String getPushToken()
This method is used for getting a PushToken from the shared preferences
-
deleteDeviceToken
final Unit deleteDeviceToken(String pushToken)
This method is used for deleting the push token via Hubspot API
- Parameters:
pushToken- : It has FCM token
-
-
-
-