Untitled
unknown
plain_text
2 years ago
978 B
7
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