com.salesforce.android.knowledge.ui.KnowledgeUIClient |
A KnowledgeUIClient
is used to launch and control the Knowledge UI. Applications should
instantiate an instance of this client using createClient(Context)
, which
may then be used to launch Knowledge UI by calling launchHome(Activity)
.
Listeners can be registered with the client to react to events that occur, for example using
addOnCloseListener(OnCloseListener)
to detect when the user has left Knowledge UI.
Instances should not be re-used after the KnowledgeUIClient.OnCloseListener
has been invoked. Applications
wishing to re-launch Knowledge UI should instantiate a new client instance for each launch.
Launching multiple concurrent instances of Knowledge UI is not supported. It is the
application's responsibility to ensure that it does not instantiate multiple KnowledgeUIClient
instances concurrently.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | KnowledgeUIClient.OnCloseListener | Interface for handling the event where the user has closed the Knowledge UI. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
addOnCloseListener(KnowledgeUIClient.OnCloseListener onCloseListener)
Register an
KnowledgeUIClient.OnCloseListener implementation with the client. | ||||||||||
abstract void |
close()
Close the UI.
| ||||||||||
abstract KnowledgeUIConfiguration |
getConfiguration()
Retrieve the
KnowledgeUIConfiguration that was used to instantiate this client. | ||||||||||
abstract KnowledgeCssProvider |
getCssProvider()
Get the
KnowledgeCssProvider instance the Knowledge UI Client is using to load custom
CSS into Knowledge articles. | ||||||||||
abstract KnowledgeImageProvider |
getImageProvider()
Get the
KnowledgeImageProvider instance the Knowledge UI Client is using to load images. | ||||||||||
abstract KnowledgeJsProvider |
getJsProvider()
Get the
KnowledgeJsProvider instance the Knowledge UI Client is using to load
custom JavaScript into Knowledge articles. | ||||||||||
abstract KnowledgeClient |
getKnowledgeCoreClient()
Get the
KnowledgeClient that the Knowledge UI Client is using to perform asynchronous
data requests. | ||||||||||
abstract void |
launchArticle(Activity activity, ArticleSummary articleSummary)
Launch the Knowledge UI Activity, if it is not already started, and load
SCENE_ARTICLE_DETAIL . | ||||||||||
abstract void |
launchHome(Activity activity)
Launch the Knowledge UI Activity, if it is not already started, and load
SCENE_HOME . | ||||||||||
abstract void |
removeOnCloseListener(KnowledgeUIClient.OnCloseListener onCloseListener)
Remove a previously-added
KnowledgeUIClient.OnCloseListener . |
Register an KnowledgeUIClient.OnCloseListener
implementation with the client. Does nothing if the listener
has already been added.
onCloseListener | The listener that will be called when Knowledge UI is closed. |
---|
Close the UI. This will finish the Knowledge UI and return control to the application.
Retrieve the KnowledgeUIConfiguration
that was used to instantiate this client.
Get the KnowledgeCssProvider
instance the Knowledge UI Client is using to load custom
CSS into Knowledge articles.
KnowledgeCssProvider
instance.
Get the KnowledgeImageProvider
instance the Knowledge UI Client is using to load images.
KnowledgeImageProvider
instance.
Get the KnowledgeJsProvider
instance the Knowledge UI Client is using to load
custom JavaScript into Knowledge articles.
KnowledgeJsProvider
instance.
Get the KnowledgeClient
that the Knowledge UI Client is using to perform asynchronous
data requests.
KnowledgeClient
instance.
Launch the Knowledge UI Activity, if it is not already started, and load SCENE_ARTICLE_DETAIL
.
ArticleSummary
instances can be obtained by submitting a query via
ArticleListRequest
.
activity | An Activity instance. |
---|---|
articleSummary | An ArticleSummary instance.
|
Launch the Knowledge UI Activity, if it is not already started, and load SCENE_HOME
.
activity | An Activity instance.
|
---|
Remove a previously-added KnowledgeUIClient.OnCloseListener
. Does nothing if the listener has not already
been added.
onCloseListener | The listener to remove. |
---|