Class PrivacyManager

java.lang.Object
com.gimbal.android.PrivacyManager

public class PrivacyManager extends Object
Provides methods for managing a user's privacy, e.g. consent requirement(s) and opt-ins for protected features and functionality
  • Method Details

    • getInstance

      public static PrivacyManager getInstance()
      Returns the global PrivacyManager instance
      Returns:
      the global PrivacyManager instance
    • getGdprConsentRequirement

      @NonNull public PrivacyManager.GdprConsentRequirement 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 is REQUIRED to give consent for the SDK to operate fully. If not running in these countries, consent is NOT_REQUIRED. If the SDK has not yet registered with the Gimbal platform, the result is REQUIREMENT_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 to
      consentState - 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