Branch.io
Equip your app with Deferred Deep by leveraging the Branch.io native SDKs.
Overview
The Branch.io Plugin enables deferred deep linking within your app, allowing users to navigate directly to specific content even after installing the app. By leveraging the power of the Branch SDK for iOS and Android (Branch SDK Overview), this plugin enhances user experience through context-aware routing and deep linking.
This guide provides step-by-step instructions for configuring the plugin and utilizing its features through the Median JavaScript Bridge.
Developer Demo
Display our demo page in your app to test during development https://median.dev/branch
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 the String
and Boolean
placeholders by following the instructions below.
{
liveKey: String, // required
testKey: String, // optional
linkDomain: String, // optional
alternateLinkDomain: String, // optional,
testLinkDomain: String, // optional
testAlternateLinkDomain: String, // optional
uriScheme: String, // optional
enableTestMode: Boolean // optional, default is false
}
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 set enableTestMode
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 domai
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.
SHA256 Cert Fingerprints
It’s important to specify the SHA256 Cert Fingerprints for App links to work properly on Android. Please see https://help.branch.io/using-branch/docs/configure-default-link-behaviors for additional information.
JavaScript Bridge Functions
Initialized Callback
The app calls this callback function when Branch SDK is has finished initializing and returns data from the link that referred the current session.
↔️Median JavaScript Bridge
median_branch_initialized(data){} // Return value: { 'success': Boolean, 'error': String, 'data': {} }
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.
↔️Median JavaScript Bridge
median.branch.getFirstParams({'callback': function}) // Return value // see https://help.branch.io/using-branch/docs/creating-a-deep-link#data-structure
Get Latest Parameters
Returns the data from the link that referred the current session.
↔️Median JavaScript Bridge
median.branch.getLatestParams({'callback': function}) // Return value // see https://help.branch.io/using-branch/docs/creating-a-deep-link#data-structure
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.
- Click the link to ensure it correctly redirects to your app.
If configured correctly, the user should be redirected into your app, with deep link data accessible through the JavaScript Bridge methods.
Updated about 1 month ago