Deep linking - Android Studio

Pulse provides a “deep linking” capability for apps to perform custom processing. The deep linked content is passed to the app when the user clicks on the notification, or as a “silent” payload, where no notification is shown.

Please refer to the demo app to see an example of using deep linking inside an app

  • To use Pulse’s deep link feature, add a class - PulseDeepLinkReceiver to the app and then instantiate this class from the app’s application class:
    PulseDeepLinkReceiver mPulseDeepLinkReceiver = new PulseDeepLinkReceiver (this);
  • Then use the intent.getStringExtra method inside the class to get deep linked content:
    LocalBroadcastManager.getInstance(mApplicationContext).registerReceiver(mSilentDeepLinkReceiver,new IntentFilter(PulseCampaignConstants.PULSE_DEEP_LINK_RECEIVER));

    private BroadcastReceiver mSilentDeepLinkReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            setPulseKey(intent.getStringExtra("key"));
            Toast.makeText(mApplication, "deeplink ="+intent.getStringExtra(PulseCampaignConstants.PULSE_DEEP_LINK_CONTENT),Toast.LENGTH_LONG).show();
        }
    };