The MOCA customNavigator is a tool to implement custom handling of the URLs enclosed in our local notification payloads (e.g. Experiences that are type URL). This is specially useful if your app implements a deep link handler that is neither of the schema kind or app links.

Our automatic deep link handler, MOCANotificationTapReceiver, when the user taps on a MOCA SDK generated notification this module receives it, which is registered in the AndroidManifest.xml. This class does the standard processing of the tap with the deep link in the following fashion:

  • If the deeplink uses the HTTP/HTTPS protocol, it opens a WebView and loads the URLs content.
  • If not, it generates an ACTION_VIEW Intent tipe ACTION_VIEW using the deep link URI. This means the App itself manages the intents.
571571
  • Thus, standard integration of deeplinks does not require any custom handling.

  • However,if you do need to customize the deep link behavior, you can do so using the custom navigator:

803803

Using this, the App must implement a handler that uses the MOCANavigator interface, and install it using the MOCA.setCustomNavigator(myNavigator);

774774

This method is available since MOCA SDK v3.3.7.