Interface UrlAction

    • Method Detail

      • shouldOverrideUrlLoading

        boolean shouldOverrideUrlLoading​(android.net.Uri uri)
        Determines if the uri can be handled by specific action. NOTE: In order to make all actions work properly - each action should handle unique URIs.
        Parameters:
        uri - which should be handled.
        Returns:
        true if given action can process such URI. False otherwise.
      • performAction

        void performAction​(android.content.Context context,
                           UrlHandler urlHandler,
                           android.net.Uri uri)
                    throws ActionNotResolvedException
        Executes specific action on the given uri.
        Parameters:
        context - activity context.
        urlHandler - holder of action.
        uri - which should be handled.
        Throws:
        ActionNotResolvedException - when action can be performed (shouldOverrideUrlLoading: true) and for some reason it's not handled NOTE: Pass reason error message into ActionNotResolvedException
      • shouldBeTriggeredByUserAction

        boolean shouldBeTriggeredByUserAction()
        Returns:
        true - if this action should be triggered by user in order to proceed. False - if performing this action doesn't require it to be triggered by user interaction.