Receive Smart Links on Android¶
GetSocial Smart Links combine two types of mobile app linking:
- Deep Linking provides a way to direct the user to a specific location within a mobile app rather than simply launching the app.
- Deferred Deep Linking that allows users to deep link to content even if the app is not already installed.
Each Smart Link has associated referral data, which you can retrieve on the receiver side. This data consists of parameters you specify during link creation and additional metadata added by GetSocial.
Prerequisite¶
- Finished Getting Started with GetSocial Android SDK guide.
Dashboard Configuration¶
To set up deep linking follow the next steps:
- Login to the GetSocial Dashboard.
- Go to the App setting section.
-
Ensure that Package name and Signing-certificate fingerprint fields matches the app you are integrating:
Setup Deep Linking¶
GetSocial Gradle Plugin configures everything automatically. If you’re not using plugin read how to configure deep linking manually.
Retrieve Referral Data¶
Follow the Referral Data guide to see how to retrieve data attached to the invitation .
Single Task/Single Top Launch Mode¶
To retrieve referral data when your Activity
is launched in Single task
or Single top
mode, you have to add following code to your Activity
:
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
setIntent(intent)
}
Validate Setup¶
- Create a Smart Link from the Dashboard or send a Smart Invite.
-
Click on the link on your phone, your app should be opened.
Make sure to run this test on the device with Android 6+ and Android below 6, as we use different deep linking mechanics on pre-Android 6 devices.
-
Additionally on Android 6+ devices, go to App info -> Open by default, supported deep linking domains should be listed in Supported links section:
Whitelist Test Devices
To get the install attribution on every install you have to whitelist your testing devices on the GetSocial Dashboard.
For more information check Whitelist Test Devices.
Next Steps¶
- Customize your Smart Link Domain.
- Customize the Landing Page.
- Setup webhooks to receive app install and app open events on your backend.
- Understand how Smart Links are performing with Analytics.