Privacy & Consent
The Android SDK provides controls for GDPR consent, GeoIP enrichment, and basic integration mode. These settings influence what data is included in SDK requests to Magify servers.
GDPR consent
Use isGdprGranted to signal whether the user has granted consent under GDPR or a similar regulation. This flag is false by default.
var isGdprGranted: Boolean
Set it to true after the user accepts your consent dialog:
magify.isGdprGranted = true
Set it to false if the user withdraws consent or if you need to operate in a restricted mode:
magify.isGdprGranted = false
Authorization status
authorizationStatus is a general-purpose tracking authorization field that influences campaign targeting and content delivery. Its initial value is AuthorizationStatus.UNKNOWN:
var authorizationStatus: AuthorizationStatus
The AuthorizationStatus enum has three values:
Set this before calling initialSetup() when the status is already known:
magify.authorizationStatus = AuthorizationStatus.AUTHORIZED
Observe authorization status changes using RxJava2:
magify.observeAuthorizationStatusChanged()
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
// React to the updated authorization status.
}
GeoIP
GeoIP allows backend services to determine the user's geographic region from their IP address. The Android SDK uses an inverted flag compared to the iOS SDK: turnOffGeoIP disables GeoIP when set to true (GeoIP is active by default when the flag is false).
var turnOffGeoIP: Boolean
Disable GeoIP:
magify.turnOffGeoIP = true
Re-enable GeoIP:
magify.turnOffGeoIP = false
When changed, the SDK resets the authorization token and triggers a configuration update.
Basic integration mode
Basic integration mode limits the data sent to Magify servers. Use it when deep behavioral targeting is not required or to reduce the integration footprint:
var isBasicIntegration: Boolean
Enable basic integration mode:
magify.isBasicIntegration = true
When changed, the SDK resets its token and forces a configuration reload.