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
Modifier and TypeClassDescriptionstatic enum
Indicates the consent chosen by the userstatic enum
The Gimbal SDK feature that may be consented tostatic enum
Indicates 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 PrivacyManager
Returns the globalPrivacyManager
instancegetUserConsent
(PrivacyManager.ConsentType consentType) Returns the user's current consent value for the specified feature type.void
setUserConsent
(PrivacyManager.ConsentType consentType, PrivacyManager.ConsentState consentState) Informs the SDK of the user's consent for the specified feature type
-
Method Details
-
getInstance
Returns the globalPrivacyManager
instance- Returns:
- the global
PrivacyManager
instance
-
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 isREQUIRED
to 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
GdprConsentRequirement
indicating 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_UNKNOWN
is returned.- Parameters:
consentType
- the SDK feature or functionality to consent to- Returns:
- whether consent was previously granted or refused
-