-
- All Implemented Interfaces:
public class WebViewHelper
-
-
Field Summary
Fields Modifier and Type Field Description public final static WebViewHelperINSTANCE
-
Method Summary
Modifier and Type Method Description final StringgetJavaScriptForWebView(ConsentToken consentToken, String appId, String userId, String extra)Generate JavaScript to pass consent information to the Web SDK final StringgetQueryStringForWebView(ConsentToken consentToken, String appId, String userId)Generate a string that can be appended to a query-string to pass consent to the Web SDK via a URL. final JsonArraytoJSONArray(Set<String> strings)Convert a set of purpose/vendor IDs to a JSON array object final StringtoJSON(ConsentToken consentToken, String appId, String userId)Generate a JSON object representing the current consent information of the user to pass to the Web SDK as external consent. -
-
Method Detail
-
getJavaScriptForWebView
final String getJavaScriptForWebView(ConsentToken consentToken, String appId, String userId, String extra)
Generate JavaScript to pass consent information to the Web SDK
- Parameters:
consentToken- the registered content tokenappId- package name of the appuserId- User IDextra- Extra JavaScript to inject in the returned tag
-
getQueryStringForWebView
final String getQueryStringForWebView(ConsentToken consentToken, String appId, String userId)
Generate a string that can be appended to a query-string to pass consent to the Web SDK via a URL.
-
toJSONArray
final JsonArray toJSONArray(Set<String> strings)
Convert a set of purpose/vendor IDs to a JSON array object
-
toJSON
final String toJSON(ConsentToken consentToken, String appId, String userId)
Generate a JSON object representing the current consent information of the user to pass to the Web SDK as external consent.
-
-
-
-