Class POBTrackerHandler
-
- All Implemented Interfaces:
public class POBTrackerHandlerPMTrackerHandler class is used to handle Ad tracker
-
-
Constructor Summary
Constructors Constructor Description POBTrackerHandler(POBNetworkHandler networkHandler)
-
Method Summary
Modifier and Type Method Description static List<String>sanitizeURLScheme(@Nullable() List<String> urls, boolean isSecure)Sanitize URLs by adding scheme/protocol to urls if not exist already. static StringsanitizeURLScheme(@Nullable() String url, boolean isSecure)Sanitize URL by adding scheme/protocol to url if not exist already. voidsendTrackers(@Nullable() List<String> urls)Method is used to send/fire tracker multiple url voidsendTracker(@Nullable() String url)Method is used to send/fir tracker after validating success voidhandleTrackersForError(@Nullable() List<String> urls, @Nullable() Map<Object, Object> macroMap, @Nullable() Map<String, String> queryMap)Executes tracker urls with macro map in loop and appends query params to pubmatic tracker urls voidsendTrackers(@Nullable() List<String> urls, @Nullable() Map<Object, Object> macroMap)Replace the macro in the given tracker URLs and executes them in loop. voidsendTracker(@Nullable() String url, @Nullable() Map<Object, Object> macroMap)Replace the macro in the given tracker URL. voidsendTracker(@Nullable() String url, @Nullable() String regex, @Nullable() String replacement)voidexecuteJsScripts(@NonNull() POBWebView webView, @NonNull() String htmlContent)Function used to execute the list of script tags or url of js files. -
-
Constructor Detail
-
POBTrackerHandler
POBTrackerHandler(POBNetworkHandler networkHandler)
-
-
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 applyisSecure- 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 applyisSecure- boolean on which sanitization applies secure/ non-secure protocol- Returns:
returns sanitized Url
-
sendTrackers
void sendTrackers(@Nullable() List<String> urls)
Method is used to send/fire tracker multiple url
- Parameters:
urls- list of 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
-
handleTrackersForError
void handleTrackersForError(@Nullable() List<String> urls, @Nullable() Map<Object, Object> macroMap, @Nullable() Map<String, String> queryMap)
Executes tracker urls with macro map in loop and appends query params to pubmatic tracker urls
- Parameters:
urls- List of tracker URLsmacroMap- Macros to be replaced in the tracker URLsqueryMap- additional data that needs to be added as query params
-
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 URLsmacroMap- Macros to be replaced in the tracker URLs
-
sendTracker
void sendTracker(@Nullable() String url, @Nullable() Map<Object, Object> macroMap)
Replace the macro in the given tracker URL.
- Parameters:
url- Tracker URLmacroMap- Macros to be replaced in the tracker URL
-
sendTracker
void sendTracker(@Nullable() String url, @Nullable() String regex, @Nullable() String replacement)
-
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 scripthtmlContent- Html formatted string for execution
-
-
-
-