Our mobile app developers are trying to setup deeplinking in In-app messaging using the Marketing Cloud SDK but it is not working as expected even after following the instructions for the official salesforce mobilesdk documentation. The callback method is not being triggered when the deeplink button is clicked. The code base is below for Android:
.setUrlHandler(new UrlHandler() {
@Nullable
@Override
public PendingIntent handleUrl(@NonNull Context context, @NonNull String url, @NonNull String s1) {
int requestCode = new Random().nextInt();
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
return PendingIntent.getActivity(getApplicationContext(),requestCode,intent,
PendingIntent.FLAG_UPDATE_CURRENT);
}
})
According to the log, for “url” actionType, call back method is triggering fine which is used for buttons with an external weblink. For “close” actionType which seems to be the type for deeplink buttons, call back method is not triggering.
Can somebody advise what might we doing wrong here? Any help will be deeply appreciated.
Thanks, G