Skip to content

PoqXert/gaconsentmanager-android-plugin

Repository files navigation

gaconsentmanager-android-plugin

Appodeal Consent Manager for Godot

API Compatible with iOS module.

Setup

If not already done, make sure you have enabled and successfully set up Android Custom Builds. Grab theGAConsentManager plugin binary and config from the releases page and put both into res://android/plugins. The plugin should now show up in the Android export settings, where you can enable it.

Usage

To use the GAConsentManager API you first have to get the GAConsentManager singleton:

var _consent_manager

func _ready():
  if Engine.has_singleton("GAConsentManager"):
    _consent_manager = Engine.get_singeton("GAConsentManager")

Regulations

enum Regulation {
  UNKNOWN = 0,
  NONE = 1,
  GDPR = 2,
  CCPA = 3,
}

Statuses

enum Status {
  UNKNOWN = 0,
  NON_PERSONALIZED = 1,
  PARTLY_PERSONALIZED = 2,
  PERSONALIZED = 3,
}

Methods

Synchronize

# Synchronize Consent Manager SDK
func synchronize(app_key: String) -> void
# Sunchronize Consent Manager SDK with params
func sunchronizeWithParams(app_key: String, params: Dictionary) -> void

Consent Dialog

# Should a consent dialog be displayed?
func shouldShowConsentDialog() -> bool
# Load Consent Dialog
func loadConsentDialog() -> void
# Is the dialog ready for display?
func isConsentDialogReady() -> bool
# Show Consent Dialog
func showConsentDialog() -> void
# Is the consent dialog shown?
func isConsentDialogPresenting() -> bool

Other

# Get regulation
func getRegulation() -> int
# Get status
func getStatus() -> int
# Get consent
func getConsent() -> bool
# Get IAB string
func getIABConsentString() -> String
# Get consent for vendor
func hasConsentForVendor(bundle: String) -> bool
# Enable IAB storage
func enableIABStorage() -> void

Signals

Sunchronize

# Emit when Consent Manager SDK synchronized
signal synchronized()
# Emit when Consent Manager SDK failed to synchronize
signal synchronize_failed(error: String)

Consent Dialog

# Emit when Consent Dialog loaded
signal dialog_loaded()
# Emit when Consent Dialog shown
signal dialog_shown()
# Emit when Consent Dialog failed to show
signal dialog_failed()
# Emit when Consent Dialog closed
signal dialog_closed()