public class WebViewHelper
extends java.lang.Object
| Constructor and Description |
|---|
WebViewHelper() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getJavaScriptForWebView(ConsentToken consentToken,
java.lang.String appId,
java.lang.String userId,
java.lang.String extra)
Generate JavaScript to pass consent information to the Web SDK
|
java.lang.String |
getQueryStringForWebView(ConsentToken consentToken,
java.lang.String appId,
java.lang.String userId)
Generate a string that can be appended to a query-string to pass
consent to the Web SDK via a URL.
|
java.lang.String |
toJSON(ConsentToken consentToken,
java.lang.String appId,
java.lang.String userId)
Generate a JSON object that encodes the current consent information of the
user to pass to the Web SDK as external consent.
|
com.google.gson.JsonArray |
toJSONArray(java.util.Set<java.lang.String> strings)
Convert a set of purpose/vendor IDs to a JSON array object
|
public com.google.gson.JsonArray toJSONArray(@NonNull
java.util.Set<java.lang.String> strings)
strings - public java.lang.String toJSON(ConsentToken consentToken, java.lang.String appId, java.lang.String userId)
public java.lang.String getQueryStringForWebView(ConsentToken consentToken, java.lang.String appId, java.lang.String userId)
public java.lang.String getJavaScriptForWebView(ConsentToken consentToken, java.lang.String appId, java.lang.String userId, java.lang.String extra)
consentToken - the registered content tokenappId - package name of the appuserId - User IDextra - Extra JavaScript to inject in the returned tag