Package com.gimbal.android
Class PrivacyManager
java.lang.Object
com.gimbal.android.PrivacyManager
Provides methods for managing a user's privacy, e.g. consent requirement(s) and opt-ins
for protected features and functionality
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumIndicates the consent chosen by the userstatic enumThe Gimbal SDK feature that may be consented tostatic enumIndicates the requirement for user consent for SDK operation under the GDPR -
Method Summary
Modifier and TypeMethodDescriptionReturns whether the user must give consent to the Gimbal SDK to process location information in accordance with the GDPR.static PrivacyManagerReturns the globalPrivacyManagerinstancegetUserConsent(PrivacyManager.ConsentType consentType) Returns the user's current consent value for the specified feature type.voidsetUserConsent(PrivacyManager.ConsentType consentType, PrivacyManager.ConsentState consentState) Informs the SDK of the user's consent for the specified feature type
-
Method Details
-
getInstance
Returns the globalPrivacyManagerinstance- Returns:
- the global
PrivacyManagerinstance
-
getGdprConsentRequirement
Returns whether the user must give consent to the Gimbal SDK to process location information in accordance with the GDPR. If the SDK is running in a country subject to the GDPR, this will indicate that the user isREQUIREDto give consent for the SDK to operate fully. If not running in these countries, consent isNOT_REQUIRED. If the SDK has not yet registered with the Gimbal platform, the result isREQUIREMENT_UNKNOWN.- Returns:
- a
GdprConsentRequirementindicating whether the user must give consent to the SDK to operate in countries subject to the GDPR.
-
setUserConsent
public void setUserConsent(@NonNull PrivacyManager.ConsentType consentType, @NonNull PrivacyManager.ConsentState consentState) Informs the SDK of the user's consent for the specified feature type- Parameters:
consentType- the SDK feature or functionality to consent toconsentState- whether consent is granted or refused
-
getUserConsent
@NonNull public PrivacyManager.ConsentState getUserConsent(@NonNull PrivacyManager.ConsentType consentType) Returns the user's current consent value for the specified feature type. If a consent value was not previously set for the feature type,CONSENT_UNKNOWNis returned.- Parameters:
consentType- the SDK feature or functionality to consent to- Returns:
- whether consent was previously granted or refused
-