Implementation guide
Plugin configuration
To set up the Branch.io plugin, update the required parameters in the Native Plugins tab under Branch.io:
Branch.io plugin configuration
Sample JSON
You can copy the following JSON file in the Advanced Configuration and replace theString and Boolean placeholders by following the instructions below.
Retrieving configuration values
Access Branch.io values from the Branch Dashboard (https://dashboard.branch.io) and apply them in Median App Studio.Live mode configuration
- Branch Key (Required)
- Path: Account Settings → Profile → Branch Key
- Usage: Set as
liveKey.
- App Link Domains (Required for deep linking)
- Path: Configuration → General → Link Domain
-
Usage:
linkDomain(Primary domain for deep linking)alternateLinkDomain(Required for Journeys/Web SDK and Deepviews)
- URI Scheme (Optional for app redirection)
- Path: Configuration → General → Android Redirects
- Usage: Set as
uriScheme.
Test mode configuration
For testing purposes, enable Test Mode on the Branch.io Dashboard and setenableTestMode to true in the configuration.
- Test Branch Key
- Path: Account Settings → Profile → Branch Key
- Usage: Set as
testKey.
- Test App Link Domains
- Path: Configuration → General → Link Domain
-
Usage:
testLinkDomain(Test version of the link domain)testAlternateLinkDomain(Test version of the alternate domain)
Branch.io configuration
Enable Android-specific deep linking features in your Branch Dashboard:- Navigate to Android Redirects settings.
- Enable “I have an Android App” and “Enable App Links”.
- Ensure SHA256 Cert Fingerprints are correctly configured.
JavaScript Bridge functions
Initialized callback
The app calls this callback function when the Branch SDK has finished initializing and returns data from the link that referred the current session.Get first parameters
Returns the data from the link that first referred the user. This is only set once, the first time the user is referred by a link. Provide a callback function or otherwise a promise is returned.Get latest parameters
Returns the data from the link that referred the current session.Testing your integration
Quick link test
- Create a Quick Link in the Branch Dashboard.
- Copy the generated link.
- Paste the link into a messaging or notes app on your test device.
- Tap the link to make sure it correctly redirects to your app.