Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
978 B
1
Indexable
Never
 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);
    };
Leave a Comment