bfgreporting.bfgRave Class
Wrapper class for basic Rave functionality. More...Inherits RaveLoginStatusListener, and RaveAppDataKeysManager.RaveAppDataKeysStateObserver.
Classes | |
enum | AccountDeletionRequestResult |
Result codes for when an account deletion request is invoked. More... | |
interface | bfgRaveDelegate |
Interface for the bfgRaveDelegate. More... | |
interface | RaveReadyListener |
RaveReady event callback delegate interface. More... | |
Public Member Functions | |
String | currentRaveId () |
Returns the current Rave Id, or null if Rave is not initialized. More... | |
String[] | getAllCurrentAuthenticatedPlugins () |
Get all current authenticated methods for the Rave user. More... | |
String | getCurrentAuthenticatedPlugin () |
Get the current authenticated method for the Rave user. More... | |
String | getCurrentEmail () |
Helper method to retrieve the user's current Rave email address. More... | |
boolean | getGoogleLoginEnabled () |
Getter method to show/hide "Sign in with Google" option. More... | |
synchronized boolean | isBackgroundInitFinished () |
Is background initialization complete. More... | |
boolean | isCurrentAuthenticated () |
Checks if the current user is authenticated. More... | |
boolean | isCurrentGuest () |
Returns whether the current user is a guest or not. More... | |
boolean | isCurrentPersonalized () |
Is the user logged in and in personalized state. More... | |
boolean | isLastGuest () |
Returns whether the previous user was a guest or not. More... | |
boolean | isRaveInitialized () |
Returns whether Rave is initialized or not. More... | |
String | lastRaveId () |
Returns the previous user's raveId. More... | |
void | listenForRaveReady (@NonNull final RaveReadyListener listener) |
Rave initializes asynchronously and should never be accessed before it has been initialized. More... | |
void | logoutCurrentUser () |
Logs out the current Rave user. More... | |
void | logoutCurrentUserWithScene (@NonNull final Activity activity) throws RaveException |
Logs out the current Rave user using the SignOut scene. More... | |
void | logoutCurrentUserWithScene (@NonNull final Activity activity, @Nullable final String origin) throws RaveException |
Logs out the current Rave user using the SignOut scene. More... | |
void | presentNewsletterSignUp (@NonNull final Activity activity) |
Displays the Rave newsletter sign up page to the user. More... | |
void | presentProfile (@NonNull final Activity activity) |
Shows the Rave Profile modal. More... | |
void | presentProfile (@NonNull final Activity activity, @Nullable final String origin) |
Shows the Rave Profile modal. More... | |
void | presentSignIn (@NonNull final Activity activity) |
Displays the Rave login page to the user. More... | |
void | presentSignIn (@NonNull final Activity activity, @Nullable final String origin) |
Displays the Rave login page to the user. More... | |
void | requestAccountDeletion () |
Sends a Zendesk request for account deletion and logs the user out of Rave. More... | |
void | setDelegate (bfgRaveDelegate raveDelegate) |
Sets the raveDelegate. More... | |
void | setGoogleLoginEnabled (boolean enableGoogleLogin) throws RaveException |
Setter method to show/hide "Sign in with Google" option. More... | |
void | setupLoginStatusCallbackWithExternalCallback (@Nullable final RaveLoginStatusListener externalCallback) |
Sets the externalLoginStatuslistener callback. More... | |
Static Public Member Functions | |
static void | changeRaveDisplayName (@NonNull final String displayName) |
Call this to set the Rave display name. More... | |
static String | currentRaveDisplayName () |
Get the Rave display name of the current user. More... | |
static void | fetchCurrentAppDataKey () |
Initiate a fetch of the current Rave App Data Key. More... | |
static void | finalizeGoogleLoginStatus () |
Helper method to lock Google Login enabled/disabled option. More... | |
static void | selectRaveAppDataKey (@Nullable final String key) |
Select the App Data Key. More... | |
static void | setRaveAppDataKeyDelegate (@Nullable final bfgRaveAppDataKeyDelegate delegate) |
Set the Rave AppDataKeys delegate to be informed of app data key changes and conflicts. More... | |
static synchronized bfgRave | sharedInstance () |
Get singleton instance of bfgRave. More... | |
static void | waitForRaveReady () |
Wait for bfgRave initialization to complete. More... | |
Detailed Description
Wrapper class for basic Rave functionality. Monitors login state changes and caches previous ids.
Member Function Documentation
◆ changeRaveDisplayName()
| inlinestatic |
Call this to set the Rave display name. The potential display name value that is passed in must meet the following requirements:
- String cannot be null
- String length must be between 4 characters and 16 characters in length
- Parameters
displayName The name that the Rave display name will be changed to.
◆ currentRaveDisplayName()
| inlinestatic |
Get the Rave display name of the current user. PREREQUISITES: None, but returns NULL if Rave is not yet initialized (using bfgManager.initializeWithActivity)
- Returns
- The Rave display name of the current user or null if there isn't one.
◆ currentRaveId()
| inline |
Returns the current Rave Id, or null if Rave is not initialized. PREREQUISITES: None, but returns NULL if Rave has not been initialized (using bfgManager.initializeWithActivity)
- Returns
- The current Rave Id, possibly null.
◆ fetchCurrentAppDataKey()
| inlinestatic |
Initiate a fetch of the current Rave App Data Key. This makes an asynchronous call to Rave to retrieve the App Data Key. If the fetch is successful, the delegate method bfgRaveFetchCurrentAppDataKeyDidSucceed will be called. If the fetch is unsuccessful, the delegate method bfgRaveFetchCurrentAppDataKeyDidFailWithError will be called. In the case where you are offline and have unresolved keys or logged out while offline, calling this method will call the delegate method bfgRaveFetchCurrentAppDataKeyDidFailWithError with null as the error value.PREREQUISITES: Rave must be initialized (using bfgManager.initializeWithActivity)
- Since
- 6.3
◆ finalizeGoogleLoginStatus()
| inlinestatic |
Helper method to lock Google Login enabled/disabled option. PREREQUISITES: None
◆ getAllCurrentAuthenticatedPlugins()
| inline |
Get all current authenticated methods for the Rave user. PREREQUISITES: Rave must be initialized (using bfgManager.initializeWithActivity)
- Returns
- an array of these types: big_fish, facebook, google, unknown_auth or none (if user is currently not authenticated).
- Since
- 7.3
◆ getCurrentAuthenticatedPlugin()
| inline |
Get the current authenticated method for the Rave user. PREREQUISITES: Rave must be initialized (using bfgManager.initializeWithActivity)
- Returns
- big_fish, facebook, google, unknown_auth or none (if user is currently not authenticated).
- Since
- 6.3
◆ getCurrentEmail()
| inline |
Helper method to retrieve the user's current Rave email address. If the user is not logged into Rave, has not set their email address, or has their account set to not share their email address, it will return null or an empty string.
- Returns
- Current Rave email if logged in, an email address is stored and sharing is allowed, null or an empty string otherwise
◆ getGoogleLoginEnabled()
| inline |
Getter method to show/hide "Sign in with Google" option. PREREQUISITES: None
- Returns
- TRUE if Login using google account is supported.
◆ isBackgroundInitFinished()
| inline |
Is background initialization complete.
- Returns
- TRUE if background initialization is complete.
◆ isCurrentAuthenticated()
| inline |
Checks if the current user is authenticated. PREREQUISITES: Rave must be initialized (using bfgManager.initializeWithActivity)
- Returns
- TRUE if the user is authenticated.
- Since
- 6.2
◆ isCurrentGuest()
| inline |
Returns whether the current user is a guest or not. PREREQUISITES: Rave must be initialized (using bfgManager.initializeWithActivity)
- Returns
- boolean value indicating whether the current user is a guest or not.
◆ isCurrentPersonalized()
| inline |
Is the user logged in and in personalized state.
- Returns
- TRUE if logged in and personalized.
- Since
- 6.2
◆ isLastGuest()
| inline |
Returns whether the previous user was a guest or not. Note: Returns false if the previous user is the same as the current user.PREREQUISITES: None
- Returns
- boolean value indicating if the last user to use the app was a guest or not.
◆ isRaveInitialized()
| inline |
Returns whether Rave is initialized or not. PREREQUISITES: None
- Returns
- boolean value indicating the status of Rave initilization.