bfgGdpr.bfgPolicyListener Interface
Listener delegate for GDPR and other policy control events. More...
Public Member Functions | |
void | onPoliciesCompleted () |
Callback when all outstanding policies have been completed by the player. More... | |
void | willShowPolicies () |
Called when it is determined that at least one policy must be accepted before continuing and policies are about to be shown to the player. More... | |
Detailed Description
Listener delegate for GDPR and other policy control events. When new policies (such as GDPR advertising permission) are discovered, the
willShowPolicies
event will be raised just before the policy or policies are shown to the user. When a user accepts or rejects all displayed policies, the onPoliciesCompleted
event will be raised to indicate that policy-related restrictions may have changed. Each Activity that needs to support policy display and acceptance (which includes most Activities used in a game) should register the policy listener in its onStart event handler and unregister it in its onStop event handler. When registered, the willShowPolicies
or onPoliciesCompleted
event will be immediately raised, if appropriate, to ensure that the game knows of any policy display or acceptance changes each time an Activity is started. This allows a game to reliably handle the case where it needs to perform any special processing in response to the display or acceptance of a policy, such as disabling use of advertising. NOTE: Policies may be updated on the server at any time, causing new policies to be discovered during game play. Games should assume that the willShowPolicies
and/or onPoliciesCompleted
events may be raised shortly after the start of any new session and should be prepared to pause game play while new policies are displayed and to enforce possible changes to policy acceptance in their game play after policy display has completed.- See also
- com.bigfishgames.bfglib.bfgManager::addPolicyListener
- com.bigfishgames.bfglib.bfgManager::removePolicyListener
- com.bigfishgames.bfglib.bfgManager::didAcceptPolicyControl
- Since
- 6.7
Member Function Documentation
◆ onPoliciesCompleted()
void com.bigfishgames.bfglib.bfgGdpr.bfgPolicyListener.onPoliciesCompleted | ( | ) |
Callback when all outstanding policies have been completed by the player. This may be called each time the listener is added, even if no new policies have been displayed. This allows a game to handle policy acceptance each time the activity starts, if desired. This will be called when the listener is added (using
com.bigfishgames.bfglib.bfgManager#addPolicyListener
), even if there are no outstanding policies. ◆ willShowPolicies()
void com.bigfishgames.bfglib.bfgGdpr.bfgPolicyListener.willShowPolicies | ( | ) |
Called when it is determined that at least one policy must be accepted before continuing and policies are about to be shown to the player. The game should assume that its screen is fully or partially hidden by a policy screen.