Explore all the frontend methods in the Plugins Client SDK.
The Plugins Client SDK provides many methods for several features in the Staffbase frontend application. Learn more about how the Plugins Client SDK works. This article lists the two categories of methods and the individual methods that belong to those categories.
These methods give information about the context of the environment in which the application is running.
Method | Description |
---|---|
deviceCanDownload() | Checks if the user's device can download a file |
isIosDevice() | Checks if the user’s device is using iOS |
isAndroidDevice() | Checks if the user’s device is using Android |
getAppVersion() | Fetches the user's app version |
isNativeApp() | Checks if the application is running on a mobile device If isNativeApp() returns true, isMobileApp() also returns true |
isMobileApp() | Checks if the application is opened in a mobile browser If the application is opened in a mobile browser, isMobileApp() returns true, but the isNativeApp() returns false |
These are methods that trigger specific actions in the frontend application.
Method | Description |
---|---|
openLink(url) | Opens a link depending on the frontend application logic |
openLinkExternal(url) | Opens a link in an external browser |
openLinkInternal(url) | Opens a link in an internal browser |
getBranchLanguages() | Fetches all the content languages added for your organization |
getBranchDefaultLanguage() | Fetches the default language configured for your organization |
getContentLanguages() | Fetches all the content languages supported by the Staffbase platform |
getUserContentLanguage() | Get the current user's content locale, fallback to default language configured for your organization |
getPreferredContentLocale(content) | Fetches the chosen language from a given content object |
openNativeShareDialog() | Opens a share dialog on mobile devices |
openNativeFileDialog() | Opens a native file upload dialog |