-
- All Implemented Interfaces:
public final class ContextHelperHelper class used to get formatted context information such as application name, agent name, etc. All the properties held here should not change throughout the lifecycle of the app so they can be computed at the beginning early in the lifecycle and then be queried.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringadvertisingIdprivate final StringapiUrlprivate final StringpackageNameprivate final StringsdkUrlprivate final StringsdkVersionNameprivate final StringplatformSourceType
-
Constructor Summary
Constructors Constructor Description ContextHelper(Context context, DidomiInitializeParameters parameters, LocalPropertiesRepository localPropertiesRepository)
-
Method Summary
Modifier and Type Method Description final StringgetAdvertisingId()Get the advertising ID from the device final StringgetApiUrl()Get the URL to the API final StringgetPackageName()Method used to get the package name. final StringgetSdkUrl()Get the URL of the SDK final StringgetSdkVersionName()Get the name of the current SDK version final StringgetPlatformSourceType()final StringgetDidomiIABConfigurationURL()Get the IAB configuration URL final StringgetDidomiIABPurposesTranslationURL(String languageCode)Get the IAB purposes translation for purposes v2 final StringgetDidomiRemoteConfigurationURL(String apiKey, String noticeId)Get the Didomi Remote Configuration URL final IntegergetImageResourceId(String name)Method used to get the Resource ID of images from the res/drawable folder. final BooleanisAndroidTV()Boolean used to determine if app is running on an AndroidTV or not. -
-
Constructor Detail
-
ContextHelper
ContextHelper(Context context, DidomiInitializeParameters parameters, LocalPropertiesRepository localPropertiesRepository)
-
-
Method Detail
-
getAdvertisingId
final String getAdvertisingId()
Get the advertising ID from the device
-
getPackageName
final String getPackageName()
Method used to get the package name.
-
getSdkVersionName
final String getSdkVersionName()
Get the name of the current SDK version
-
getPlatformSourceType
final String getPlatformSourceType()
-
getDidomiIABConfigurationURL
final String getDidomiIABConfigurationURL()
Get the IAB configuration URL
-
getDidomiIABPurposesTranslationURL
final String getDidomiIABPurposesTranslationURL(String languageCode)
Get the IAB purposes translation for purposes v2
- Parameters:
languageCode- requested language code
-
getDidomiRemoteConfigurationURL
final String getDidomiRemoteConfigurationURL(String apiKey, String noticeId)
Get the Didomi Remote Configuration URL
-
getImageResourceId
final Integer getImageResourceId(String name)
Method used to get the Resource ID of images from the res/drawable folder.
- Parameters:
name- image name to find in the image folder.
-
isAndroidTV
final Boolean isAndroidTV()
Boolean used to determine if app is running on an AndroidTV or not.
-
-
-
-