Beacon

open class Beacon

Types

Builder
Link copied to clipboard
class Builder
Used to config and setup your Beacon, this should be called in your Application's `onCreate()` method

Functions

addAttributeWithKey
Link copied to clipboard
open fun addAttributeWithKey(@NotNull() key: @NotNull() String, @NotNull() value: @NotNull() String): Boolean
Used to add an user attribute represented as a key / value pairThere is a limit of 30 attributes per user
addPreFilledForm
Link copied to clipboard
open fun addPreFilledForm(preFilledForm: PreFilledForm)
Allows Pre-filling of the Contact form.
authType
Link copied to clipboard
open fun authType(): BeaconAuthType
basic or secure authentication type
beaconId
Link copied to clipboard
open fun beaconId(): String
Id of this Beacon i.
chatEnabled
Link copied to clipboard
open fun chatEnabled(): Boolean
Returns true if this Beacon has Realtime chat feature enabled
clear
Link copied to clipboard
open fun clear()
Clears the all persisted Beacon data including Beacon Id, user details log setting, overrides, etc.
clearAttributes
Link copied to clipboard
open fun clearAttributes()
Remove all User attributes
contactFormReset
Link copied to clipboard
open fun contactFormReset()
Resets the contact form by clearing all of its fields, custom fields and attachments.
docsEnabled
Link copied to clipboard
open fun docsEnabled(): Boolean
Returns true if this Beacon has Docs feature enabled
email
Link copied to clipboard
open fun email(): String
email used to identify the user
getSessionAttributes
Link copied to clipboard
@NotNull()
open fun getSessionAttributes(): @NotNull() Map<String, String>
Retrieves the current session attributes
identify
Link copied to clipboard
open fun identify(@NotNull() email: @NotNull() String)
Used to identify users when beacon is configured for basic mode.
open fun identify(@NotNull() email: @NotNull() String, @Nullable() name: String)
Used to identify users when beacon is configured for basic mode.
open fun identify(@NotNull() email: @NotNull() String, @Nullable() name: String, @Nullable() company: String, @Nullable() jobTitle: String, @Nullable() avatar: String)
Used to identify users plus adds support for special attributes
isEnabled
Link copied to clipboard
open fun isEnabled(): Boolean
true if BeaconId as been defined | false if `beaconId()` is empty
login
Link copied to clipboard
open fun login(@NotNull() email: @NotNull() String)
Used to identify users when beacon is configured for basic mode.
open fun login(@NotNull() email: @NotNull() String, @Nullable() name: String)
Used to identify users when beacon is configured for basic mode.
logout
Link copied to clipboard
open fun logout()
Clears the Beacon User details, i.e email, name, signature, user attributes.
logsEnabled
Link copied to clipboard
open fun logsEnabled(): Boolean
Enables HTTP interceptor to print API calls to logcat.
messagingEnabled
Link copied to clipboard
open fun messagingEnabled(): Boolean
Returns true if this Beacon has Messaging/contact form feature enabled
prefilledFormReset
Link copied to clipboard
open fun prefilledFormReset()
Resets the prefilled contact form data
previousMessagesEnabled
Link copied to clipboard
open fun previousMessagesEnabled(): Boolean
Returns true if this Beacon has enable previous messages.
removeAttribute
Link copied to clipboard
open fun removeAttribute(@NotNull() key: @NotNull() String): Boolean
Remove a specific user attribute
resetSuggestedArticlesOverrides
Link copied to clipboard
open fun resetSuggestedArticlesOverrides()
This can be used to clear the override suggested articles.
setConfigOverrides
Link copied to clipboard
open fun setConfigOverrides(@NotNull() configOverrides: @NotNull() BeaconConfigOverrides)
Override the configuration from the Beacon Builder defined on the Beacon admin page on Helpscout
setFirebaseCloudMessagingToken
Link copied to clipboard
open fun setFirebaseCloudMessagingToken(token: String)
Stores the push notification token created in the host app
setOverrideChatEnabled
Link copied to clipboard
open fun setOverrideChatEnabled(overrideChatEnabled: Boolean)
This can be used to override and disable the Beacon Builder real time Chat.You may want your Beacon to support chat but not for every user.
setOverrideDocsEnabled
Link copied to clipboard
open fun setOverrideDocsEnabled(overrideDocsEnabled: Boolean)
This can be used to override and disable the Beacon Builder Articles/Docs option.You may want your Beacon not to have articles form for every user.
setOverrideMessagingEnabled
Link copied to clipboard
open fun setOverrideMessagingEnabled(messagingEnabled: Boolean)
This can be used to override and disable the Beacon Builder Messaging/Contact from option.You may want your Beacon to have a contact form but not for every user.
setOverrideSuggestedArticles
Link copied to clipboard
open fun setOverrideSuggestedArticles(articleIds: List<String>)
This can be used to override the suggested articles on the Help & Support screen.There is a limit of 5 article ids.
setOverrideSuggestedArticlesOrLinks
Link copied to clipboard
open fun setOverrideSuggestedArticlesOrLinks(suggestions: List<SuggestedArticle>)
This can be used to override the suggested articles on the Help & Support screen.There is a limit of 5 article ids.
setSessionAttributes
Link copied to clipboard
open fun setSessionAttributes(@NotNull() sessionAttributes: @NotNull() Map<String, String>): Boolean
Add an session attributes to the next chat or conversation sent via the Beacon SDK.
showPrefilledCustomFields
Link copied to clipboard
open fun showPrefilledCustomFields(show: Boolean)
Control whether users of the contact form can see/edit custom field values when they are pre-filled.
signature
Link copied to clipboard
open fun signature(): String
Generated on your server with the Beacon's Secret key.
userHasEmail
Link copied to clipboard
open fun userHasEmail(): Boolean
true if email as been defined | false if `email()` is empty
version
Link copied to clipboard
open fun version(): String
SDK Version

Properties

ARTICLE_SUGGESTION_LIMIT
Link copied to clipboard
val ARTICLE_SUGGESTION_LIMIT: Int