Copilot & HelpHub in Android
- Java 17
- Android Studio
To add the CommandBarAndroid library to your project, you can use Maven Central. Add the following lines to your build.gradle file:
repositories {
mavenCentral()
}
dependencies {
implementation 'com.commandbar.android:commandbar:1.0.10'
}import com.commandbar.android.CommandBar;
import com.commandbar.android.HelpHubWebView;
openHelpHub: Opens the HelpHub in a BottomSheetDialog
context(required): An instance of the Context/Activity to open a BottomSheetDialog onoptions(required): An instance of theCommandBarOptionsclass that holds the options for the `HelpHubWebView``.orgId(required): Your Organization ID from CommandBarspinnerColor(optional): Optionally specify a color to render the loading Spinner
articleId(optional): Optionally specify an article ID to open a specific article in HelpHubonFallbackAction(optional): A callback function to receive an event when a Fallback CTA is interacted with in HelpHub/Copilot
init: Loads HelpHub in a WebView. The WebView won't load its content until options are set on intialization or via setters
context(required): An instance of the Context/Activity to attach tooptions(optional): An instance of theCommandBarOptionsclass that holds the options for the `HelpHubWebView``.orgId(required): Your Organization ID from CommandBarspinnerColor(optional): Optionally specify a color to render the loading Spinner
articleId(optional): Optionally specify an article ID to open a specific article in HelpHubonFallbackAction(optional): A callback function to receive an event when a Fallback CTA is interacted with HelpHub/Copilot
To run the example project, clone the repo and open the project in Android Studio.
CommandBarAndroid is available under the MIT license. See the LICENSE file for more info.
