Class POBTrackerHandler

  • All Implemented Interfaces:

    
    public class POBTrackerHandler
    
                        

    PMTrackerHandler class is used to handle Ad tracker

    • Constructor Detail

    • Method Detail

      • sanitizeURLScheme

        @NonNull() static List<String> sanitizeURLScheme(@Nullable() List<String> urls, boolean isSecure)

        Sanitize URLs by adding scheme/protocol to urls if not exist already.

        Parameters:
        urls - list of urls on which sanitization is going to apply
        isSecure - boolean on which sanitization applies secure/ non-secure protocol
        Returns:

        returns sanitezed Url list

      • sanitizeURLScheme

        @Nullable() static String sanitizeURLScheme(@Nullable() String url, boolean isSecure)

        Sanitize URL by adding scheme/protocol to url if not exist already. Note: It is temporary provision to process t.pubmatic tracker which comes as 'protocol independent' url in ad response. Network handler is not able to handle protocol independent urls. if isSecure param is true then returns url with secure protocol else returns non-secure url

        Parameters:
        url - url on which sanitization is going to apply
        isSecure - boolean on which sanitization applies secure/ non-secure protocol
        Returns:

        returns sanitized Url

      • sendTracker

         void sendTracker(@Nullable() String url)

        Method is used to send/fir tracker after validating success

        Parameters:
        url - on which tracker to be send
      • sendTrackers

         void sendTrackers(@Nullable() List<String> urls, @Nullable() Map<Object, Object> macroMap)

        Replace the macro in the given tracker URLs and executes them in loop.

        Parameters:
        urls - List of tracker URLs
        macroMap - Macros to be replaced in the tracker URLs
      • executeJsScripts

        @MainThread() void executeJsScripts(@NonNull() POBWebView webView, @NonNull() String htmlContent)

        Function used to execute the list of script tags or url of js files.

        Parameters:
        webView - WebView instance for executing js script
        htmlContent - Html formatted string for execution