Skip to main content
Version: 10.14.x

Newsletter.BfgNewsletterWrapper Class

Static Public Member Functions

static void Initialize (string gameObjectListener, string callback)
 Initializes the newsletter consent system for the current platform. Should be called once during application startup, passing the name of the Unity GameObject and the callback method that will receive the result (e.g., "OnNewsletterConsentSelected"). More...
 
static NewsletterConsentData GetNewsletterConsent ()
 Retrieves the user's newsletter consent status from native code. This includes the status (Consented, Denied, Unknown) and an associated timestamp. More...
 
static void ShowNewsletterConsentScreen ()
 Displays the newsletter consent screen to the user. This prompts the user to either consent or decline receiving newsletters, if supported on the current platform.
 

Member Function Documentation

◆ GetNewsletterConsent()

static NewsletterConsentData BFGSDK.Newsletter.BfgNewsletterWrapper.GetNewsletterConsent ()
inlinestatic
Retrieves the user's newsletter consent status from native code. This includes the status (Consented, Denied, Unknown) and an associated timestamp.
Returns
A NewsletterConsentData struct containing the consent status and timestamp. Returns Unknown status and empty timestamp if unsupported or not initialized.

◆ Initialize()

static void BFGSDK.Newsletter.BfgNewsletterWrapper.Initialize (string gameObjectListener,
string callback 
)
inlinestatic
Initializes the newsletter consent system for the current platform. Should be called once during application startup, passing the name of the Unity GameObject and the callback method that will receive the result (e.g., "OnNewsletterConsentSelected").
Parameters
gameObjectListenerThe name of the GameObject that will receive the callback.
callbackThe name of the method to call with the consent result.

Static Public Member Functions

static void Initialize (string gameObjectListener, string callback)
 Initializes the newsletter consent system for the current platform. Should be called once during application startup, passing the name of the Unity GameObject and the callback method that will receive the result (e.g., "OnNewsletterConsentSelected"). More...
 
static NewsletterConsentData GetNewsletterConsent ()
 Retrieves the user's newsletter consent status from native code. This includes the status (Consented, Denied, Unknown) and an associated timestamp. More...
 
static void ShowNewsletterConsentScreen ()
 Displays the newsletter consent screen to the user. This prompts the user to either consent or decline receiving newsletters, if supported on the current platform.
 

Member Function Documentation

◆ GetNewsletterConsent()

static NewsletterConsentData BFGSDK.Newsletter.BfgNewsletterWrapper.GetNewsletterConsent ()
inlinestatic
Retrieves the user's newsletter consent status from native code. This includes the status (Consented, Denied, Unknown) and an associated timestamp.
Returns
A NewsletterConsentData struct containing the consent status and timestamp. Returns Unknown status and empty timestamp if unsupported or not initialized.

◆ Initialize()

static void BFGSDK.Newsletter.BfgNewsletterWrapper.Initialize (string gameObjectListener,
string callback 
)
inlinestatic
Initializes the newsletter consent system for the current platform. Should be called once during application startup, passing the name of the Unity GameObject and the callback method that will receive the result (e.g., "OnNewsletterConsentSelected").
Parameters
gameObjectListenerThe name of the GameObject that will receive the callback.
callbackThe name of the method to call with the consent result.