Untitled

 avatar
unknown
plain_text
a year ago
978 B
4
Indexable
 const handleDeeplinkWithPayload = (smartechData) => {
    console.log('Smartech Data :: ', smartechData);
    console.log('Smartech Deeplink :: ', smartechData.smtDeeplink);
    console.log('Smartech CustomPayload:: ', smartechData.smtCustomPayload);
 };
  useEffect(() => {

   
   // Deeplink callback for Push Notification, InappMessage and AppInbox
 SmartechReact.addListener(SmartechReact.SmartechDeeplink, handleDeeplinkWithPayload);

 // Android callback to handle deeplink in terminated/background state.
  SmartechPushReact.getDeepLinkUrl(function (smartechData) {
       console.log('Smartech Data ::', smartechData);
       // Handling the SDK Deeplink Callback.
       console.log('Smartech Deeplink :: ', smartechData.smtDeeplink);
       console.log('Smartech CustomPayload:: ', smartechData.smtCustomPayload);
 
   });
 
   
 
 //Remove this listener on cleanup

 return function cleanup() {
  SmartechReact.removeListener(SmartechReact.SmartechDeeplink);
    };
Editor is loading...
Leave a Comment