Class

AppInitialisationApi

AppInitialisationApi()

App Initialisation Hooks. Instance name: appInitialisationApi

You can use this hook to customize your app initialization screen and help improve UX for your app. There are a range of things you can do with this hook such as loading home screen in the background, displaying splash toast message and more.

Constructor

# new AppInitialisationApi()

Example
externalCodeSetup.appInitialisationApi.METHOD_NAME

Methods

# setHomeScreenPrefetchEnabled(isEnabled)

When the hook is enabled, it can help improve the UX. It enables the home screen to load as the background of the app launch screen even before the user signs in. When the hook is set to false, the app will only show the home screen once the user signs in.

Parameters:
Name Type Description
isEnabled Boolean

True if home screen should be prefetched

Example
externalCodeSetup.appInitialisationApi.setHomeScreenPrefetchEnabled(true)

# setInitialServerUrlOverrider(initialServerUrlOverrider)

You can use this if you are using multisite and want to override the initial server_url in RootWrapper. For example, the hook can be used to make the app call API requests to "https://my.example.com" instead of "https://example.com" for your BuddyBoss website.

Parameters:
Name Type Description
initialServerUrlOverrider ServerUrlOverriderFunction

Overrides initial server_url in RootWrapper for multisite user

Example
externalCodeSetup.appInitialisationApi.setInitialServerUrlOverrider((props) => {
 return props.sites[1].siteurl;
})

# setSplashScreenToastText(textnullable)

The hook is used to set a splash screen toast message to show up during app initialization. The splash screen toast message is a small message that shows up at the bottom of the screen for a while and then disappears. It is often used to make a program more interactive and visual.

Parameters:
Name Type Attributes Description
text String <nullable>

Sets splash screen toast message during app initialization

Example
externalCodeSetup.appInitialisationApi.setSplashScreenToastText("Welcome to my app!")