# Class AnalyticsConsent.Builder

java.lang.Object
com.codename1.analytics.AnalyticsConsent.Builder

Enclosing class:
  `AnalyticsConsent`

public static final class AnalyticsConsent.Builder extends Object
Mutable builder for `AnalyticsConsent`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AnalyticsConsent.Builder`
  `adStorage(boolean value)`
  Sets the ad storage category.
  `AnalyticsConsent.Builder`
  `all()`
  Grants every category.
  `AnalyticsConsent.Builder`
  `analytics(boolean value)`
  Sets the analytics category.
  `AnalyticsConsent`
  `build()`
  Builds the immutable consent object.
  `AnalyticsConsent.Builder`
  `crashReporting(boolean value)`
  Sets the crash reporting category.
  `AnalyticsConsent.Builder`
  `none()`
  Denies every category.
  `AnalyticsConsent.Builder`
  `personalization(boolean value)`
  Sets the personalization category.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Builder

    public Builder()

- ## Method Details

  - ### analytics

    public AnalyticsConsent.Builder analytics(boolean value)

    Sets the analytics category.

    ###### Parameters

    - `value`: true to grant behavioural analytics

    ###### Returns

    this builder

  - ### crashReporting

    public AnalyticsConsent.Builder crashReporting(boolean value)

    Sets the crash reporting category.

    ###### Parameters

    - `value`: true to grant crash reporting

    ###### Returns

    this builder

  - ### personalization

    public AnalyticsConsent.Builder personalization(boolean value)

    Sets the personalization category.

    ###### Parameters

    - `value`: true to grant personalization

    ###### Returns

    this builder

  - ### adStorage

    public AnalyticsConsent.Builder adStorage(boolean value)

    Sets the ad storage category.

    ###### Parameters

    - `value`: true to grant ad storage

    ###### Returns

    this builder

  - ### all

    public AnalyticsConsent.Builder all()

    Grants every category. Handy as a base before selectively revoking one, e.g. `builder().all().adStorage(false)`.

    ###### Returns

    this builder

  - ### none

    public AnalyticsConsent.Builder none()

    Denies every category.

    ###### Returns

    this builder

  - ### build

    public AnalyticsConsent build()

    Builds the immutable consent object.

    ###### Returns

    a new `AnalyticsConsent`