Interface InAppMessageEventHandler

  • All Implemented Interfaces:

    
    public interface InAppMessageEventHandler
    
                        

    Interface for take actions on an InAppMessage presentation.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit handleJavascriptMessage(String handlerName, AdobeCallback<String> callback) Registers a {@link JavascriptInterface} for the provided handler name to the {@link WebView} associated with the InAppMessage presentation to handle Javascript messages.
      abstract Unit evaluateJavascript(String jsContent, AdobeCallback<String> callback) Evaluates the provided javascript content in the {@link WebView} maintained by the InAppMessage and passes the result to the provided callback.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • handleJavascriptMessage

         abstract Unit handleJavascriptMessage(String handlerName, AdobeCallback<String> callback)

        Registers a {@link JavascriptInterface} for the provided handler name to the {@link WebView} associated with the InAppMessage presentation to handle Javascript messages. When the registered handlers are executed via the HTML the result will be passed back to the associated callback.

        Parameters:
        handlerName - the name of the handler to register
        callback - the callback to be invoked with the result of the javascript execution
      • evaluateJavascript

         abstract Unit evaluateJavascript(String jsContent, AdobeCallback<String> callback)

        Evaluates the provided javascript content in the {@link WebView} maintained by the InAppMessage and passes the result to the provided callback.

        Parameters:
        jsContent - the javascript content to be executed
        callback - the callback to be invoked with the result of the javascript execution