bfgManager Class
Static Public Member Functions | |
static void | setParentViewController () |
Currently only works for iOS More... | |
static long | userID () |
Get current user ID. | |
static void | setUserID (long userID) |
Set the current user ID More... | |
static void | setAttributionUserID (string userID) |
Set the current attribution user ID More... | |
static long | sessionCount () |
Determines the number of sessions in the application. | |
static bool | isInitialLaunch () |
Determines if this is the initial launch or "install" of the application. | |
static bool | isFirstTime () |
Currently only works for iOS. Determines if the application has been started from a cold-start. | |
static bool | isInitialized () |
Determines if SDK is initialized yet. | |
static void | showSupport () |
Launches the Help Center Activity. Requires that parentViewController is set. | |
static void | showPrivacy () |
Show the Privacy page using the in-game browser. | |
static void | showTerms () |
Show the Terms of Use page with the in-game browser. | |
static void | showWebBrowser (string startPage) |
Show an in-game browser displaying startPage. More... | |
static void | removeWebBrowser () |
Removes the in-game browser shown via showWebBrowser: | |
static bool | checkForInternetConnection () |
Returns a boolean indicating whether the device can access the Internet. For convenience, this also displays a built-in alert dialog notifying the user that an Internet connection was not found. | |
static bool | checkForInternetConnectionAndAlert (bool displayAlert) |
Returns a boolean indicating whether the device can access the Internet. Also can display an alert if the device is not connected. More... | |
static void | showNoConnectivityAlert (bool showStore=false) |
static void | addPauseResumeDelegate () |
Currently only works on iOS. Call this method to add a delegate to listen for pause/resume events from the SDK. | |
static void | removePauseResumeDelegate () |
Currently only works on iOS. Call this method to remove a pause/resume event delegate. | |
static bool | isPaused () |
Test to see if game should be paused. Returns true if the game should be paused. | |
static bool | getDebugDictionary (ref string jsonDebugDictionary) |
Currently only works on iOS. Gets the debug dictionary currently being used for purchase testing. More... | |
static void | setDebugDictionary (string jsonDebugDictionary) |
Currently only works on iOS. Sets the debug dictionary for purchase testing based on the given json. More... | |
static void | addPolicyListener (NotificationHandler willShowPolicies, NotificationHandler onPoliciesCompleted) |
Adds the policy listener. This method internally creates a notification observer for bfgCommon.BFG_POLICY_LISTENER_WILLSHOWPOLICIES and bfgCommon.BFG_POLICY_LISTENER_ONPOLICIESCOMPLETED. To remove the policy listeners, please call removePolicyListener with the notification observers you have created. More... | |
static void | removePolicyListener (NotificationHandler willShowPolicies, NotificationHandler onPoliciesCompleted) |
Removes the policy listener. More... | |
static bool | didAcceptPolicyControl (string policyControl) |
Determines if a given policy control was accepted. More... | |
static void | setLimitEventAndDataUsage (bool limitData) |
Limits Facebook's use of data to analytics and conversions. More... | |
static void | requestTrackingAuthorization () |
Triggers the display of the Apple App Transparency Tracking prompt to request user's permission to retrieve IDFA. Utilize the attSelectionRequired() method to determine if the user has made an ATT selection. More... | |
static bool | attSelectionRequired () |
Determine if AppTrackingTransparency dialog should be displayed to the user. Typically used with pre-ATT pop up dialog and in conjunction with the requestTrackingAuthorization() method. More... | |
static int | attStatus () |
Return an int representing the user's App Tracking Transparency status as defined by Apple's enum: ATTrackingManager.AuthorizationStatus More... | |
Member Function Documentation
◆ addPolicyListener()
| inlinestatic |
Adds the policy listener. This method internally creates a notification observer for bfgCommon.BFG_POLICY_LISTENER_WILLSHOWPOLICIES and bfgCommon.BFG_POLICY_LISTENER_ONPOLICIESCOMPLETED. To remove the policy listeners, please call removePolicyListener with the notification observers you have created.
- Parameters
willShowPolicies The listener for willShowPolicies. onPoliciesCompleted The listener for onPoliciesCompleted.
◆ attSelectionRequired()
| inlinestatic |
Determine if AppTrackingTransparency dialog should be displayed to the user. Typically used with pre-ATT pop up dialog and in conjunction with the requestTrackingAuthorization() method.
- Returns
- TRUE if user must interact with ATT dialog
- Warning
- Only for iOS 14 and above. On Android and lower iOS versions, this method will ALWAYS return FALSE.
◆ attStatus()
| inlinestatic |
Return an int representing the user's App Tracking Transparency status as defined by Apple's enum: ATTrackingManager.AuthorizationStatus
- -1: User is running on a non-iOS device OR a pre-iOS 14 OS; no action required
- 0: notDetermined
- 1: restricted
- 2: denied
- 3: authorized
- Returns
- int representing user's App Tracking Transparency status
◆ checkForInternetConnectionAndAlert()
| inlinestatic |
Returns a boolean indicating whether the device can access the Internet. Also can display an alert if the device is not connected.
- Parameters
displayAlert Whether an alert should be displayed if there is no connection.
◆ didAcceptPolicyControl()
| inlinestatic |
Determines if a given policy control was accepted.
- Parameters
policyControl The policy control name to check
- Returns
- TRUE if the control specified by policyControl was accepted, otherwise FALSE.
◆ getDebugDictionary()
| inlinestatic |
Currently only works on iOS. Gets the debug dictionary currently being used for purchase testing.
- Parameters
jsonDebugDictionary The current debug dictionary as a string
- Returns
- If true, the debug dictionary was successfully retrieved. If false, there was a problem while retrieving the debug dictionary.
◆ removePolicyListener()
| inlinestatic |
Removes the policy listener.
- Parameters
willShowPolicies The listener for willShowPolicies. onPoliciesCompleted The listener for onPoliciesCompleted.
◆ requestTrackingAuthorization()
| inlinestatic |
Triggers the display of the Apple App Transparency Tracking prompt to request user's permission to retrieve IDFA. Utilize the attSelectionRequired() method to determine if the user has made an ATT selection.
- Warning
- Only for iOS 14 and above. On Android and lower iOS versions, this method will have no effect.
◆ setAttributionUserID()
| inlinestatic |
Set the current attribution user ID
- Parameters
userID User ID to set.
◆ setDebugDictionary()
| inlinestatic |
Currently only works on iOS. Sets the debug dictionary for purchase testing based on the given json.
- Parameters
jsonDebugDictionary The new debug dictionary to use
◆ setLimitEventAndDataUsage()
| inlinestatic |
Limits Facebook's use of data to analytics and conversions.
- Parameters
limitData Limits data usage if true
◆ setParentViewController()
| inlinestatic |
Currently only works for iOS This sets the view controller to use when showing the GDN or interstitials for both launch (startup) and resume events in the UI. The parent view controller is initially set using the initializeWithActivity, but can be changed by calling this method if a different view should become the parent view for receiving GDN and interstitials. If you change your root Activity, you must call this method.
◆ setUserID()
| inlinestatic |
Set the current user ID
- Parameters
userID User ID to set.
◆ showWebBrowser()
| inlinestatic |
Show an in-game browser displaying startPage.
- Parameters
startPage startPage URL whose content is to be displayed to the user.