public class ContextHelper
extends java.lang.Object
| Constructor and Description |
|---|
ContextHelper() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAdvertisingId()
Get the advertising ID from the device
|
java.lang.String |
getAgentName()
Method used to get the agent name.
|
java.lang.String |
getAPIURL()
Get the URL to the API
|
java.lang.String |
getDidomiIABConfigurationURL(java.lang.String tcfVersion)
Get the IAB configuration URL
|
java.lang.String |
getDidomiRemoteConfigurationURL(java.lang.String apiKey,
java.lang.String noticeId)
Get the Didomi Remote Configuration URL
|
int |
getImageResourceId(android.content.Context context,
java.lang.String name)
Method used to get the Resource ID of images from the res/drawable folder.
|
java.lang.String |
getPackageName()
Method used to get the package name.
|
java.lang.String |
getPlatformSourceType()
Get current platform type
|
java.lang.String |
getSDKURL()
Get the URL of the SDK
|
java.lang.String |
getSDKVersionName()
Get the name of the current SDK version
|
void |
initialize(android.content.Context context,
android.content.SharedPreferences sharedPreferences)
Initialize the context helper
|
boolean |
isAndroidTV()
Boolean used to determine if app is running on an AndroidTV or not.
|
void |
setUserAgent(java.lang.String name,
java.lang.String version)
Set custom user agent name and version
|
public void initialize(android.content.Context context,
android.content.SharedPreferences sharedPreferences)
context - sharedPreferences - public void setUserAgent(java.lang.String name,
java.lang.String version)
name - Name of the user agentversion - Version of the user agentpublic java.lang.String getAgentName()
public java.lang.String getPackageName()
public java.lang.String getAdvertisingId()
public java.lang.String getSDKVersionName()
public java.lang.String getAPIURL()
public java.lang.String getSDKURL()
public java.lang.String getPlatformSourceType()
Stringpublic java.lang.String getDidomiRemoteConfigurationURL(java.lang.String apiKey,
java.lang.String noticeId)
public java.lang.String getDidomiIABConfigurationURL(java.lang.String tcfVersion)
tcfVersion - "v1" or "v2"public int getImageResourceId(android.content.Context context,
java.lang.String name)
context - application contextname - image name to find in the image folder.public boolean isAndroidTV()
true if app is running on AndroidTV, false otherwise.