Class BrainCloudWrapper
- All Implemented Interfaces:
IBrainCloudWrapper,IServerCallback
public class BrainCloudWrapper extends Object implements IServerCallback, IBrainCloudWrapper
By using the wrapper authentication methods, the anonymous and profile ids will be automatically persisted upon successful authentication. When authenticating, any stored anonymous/profile ids will be sent to the server. This strategy is useful when using anonymous authentication.
-
Constructor Summary
Constructors Constructor Description BrainCloudWrapper()BrainCloudWrapper(String wrapperName)Instantiate a copy of the brainCloud wrapper. -
Method Summary
Modifier and Type Method Description voidauthenticateAdvanced(AuthenticationType authenticationType, AuthenticationIds ids, boolean forceCreate, String extraJson, IServerCallback callback)voidauthenticateAnonymous(IServerCallback callback)Authenticate a user anonymously with brainCloud - used for apps that don't want to bother the user to login, or for users who are sensitive to their privacyvoidauthenticateApple(String appleUserId, String token, boolean forceCreate, IServerCallback callback)Authenticate the user using an apple userid(email address) and apple authentication token.voidauthenticateEmailPassword(String email, String password, boolean forceCreate, IServerCallback callback)Authenticate the user with a custom Email and Password.voidauthenticateExternal(String userId, String token, String externalAuthName, boolean forceCreate, IServerCallback callback)Authenticate the user via cloud code (which in turn validates the supplied credentials against an external system).voidauthenticateFacebook(String fbUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)Authenticate the user with brainCloud using their Facebook CredentialsvoidauthenticateFacebookLimited(String fbLimitedUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)Authenticate the user with brainCloud using their FacebookLimited CredentialsvoidauthenticateGoogle(String googleUserId, String googleAuthToken, boolean forceCreate, IServerCallback callback)Authenticate the user using a google userid(email address) and google authentication token.voidauthenticateGoogleOpenId(String googleOpenId, String googleAuthToken, boolean forceCreate, IServerCallback callback)Authenticate the user using a google userid(email address) and google authentication token.voidauthenticateHandoff(String handoffId, String securityToken, IServerCallback callback)Authenticate the user using a handoffId and an authentication token.voidauthenticateSettopHandoff(String handoffCode, IServerCallback callback)Authenticate the user using a handoffId and an authentication token.voidauthenticateSteam(String steamUserId, String steamSessionTicket, boolean forceCreate, IServerCallback callback)Authenticate the user using a steam userid and session ticket (without any validation on the userid).voidauthenticateTwitter(String userId, String token, String secret, boolean forceCreate, IServerCallback callback)Authenticate the user using a Twitter userid, authentication token, and secret from Twitter.voidauthenticateUltra(String ultraUsername, String ultraIdToken, boolean forceCreate, IServerCallback callback)Authenticate the user for Ultra.voidauthenticateUniversal(String userId, String userPassword, boolean forceCreate, IServerCallback callback)Authenticate the user using a userid and password (without any validation on the userid).booleangetAlwaysAllowProfileSwitch()Returns the value for always allow profile switchAppStoreServicegetAppStoreService()AsyncMatchServicegetAsyncMatchService()AuthenticationServicegetAuthenticationService()ChatServicegetChatService()BrainCloudClientgetClient()Returns a singleton instance of the BrainCloudClient, if this is the BrainCloudWrapper Singleton.CustomEntityServicegetCustomEntityService()DataStreamServicegetDataStreamService()EntityServicegetEntityService()EventServicegetEventService()FileServicegetFileService()FriendServicegetFriendService()GamificationServicegetGamificationService()GlobalAppServicegetGlobalAppService()GlobalEntityServicegetGlobalEntityService()GlobalFileServicegetGlobalFileService()GlobalStatisticsServicegetGlobalStatisticsService()GroupFileServicegetGroupFileService()GroupServicegetGroupService()IdentityServicegetIdentityService()ItemCatalogServicegetItemCatalogService()SocialLeaderboardServicegetLeaderboardService()LobbyServicegetLobbyService()MailServicegetMailService()MatchMakingServicegetMatchMakingService()MessagingServicegetMessagingService()OneWayMatchServicegetOneWayMatchService()PlaybackStreamServicegetPlaybackStreamService()PlayerStateServicegetPlayerStateService()PlayerStatisticsEventServicegetPlayerStatisticsEventService()PlayerStatisticsServicegetPlayerStatisticsService()PresenceServicegetPresenceService()ProfanityServicegetProfanityService()PushNotificationServicegetPushNotificationService()RedemptionCodeServicegetRedemptionCodeService()RelayServicegetRelayService()PlatformgetReleasePlatform()RTTServicegetRTTService()S3HandlingServicegetS3HandlingService()ScriptServicegetScriptService()SocialLeaderboardServicegetSocialLeaderboardService()protected StringgetStoredAuthenticationType()StringgetStoredProfileId()Returns the stored profile idTimeServicegetTimeService()TournamentServicegetTournamentService()UserItemsServicegetUserItemsService()VirtualCurrencyServicegetVirtualCurrencyService()voidinitialize(String appId, String secretKey, String appVersion)Method initializes the BrainCloudClient.voidinitialize(String appId, String secretKey, String appVersion, String serverUrl)Method initializes the BrainCloudClient.protected voidinitializeIdentity(boolean isAnonymousAuth)voidreconnect(IServerCallback callback)Re-authenticates the user with brainCloudvoidresetEmailPassword(String email, IServerCallback callback)Authenticate the user with a custom Email and Password.voidresetEmailPasswordAdvanced(String email, String serviceParams, IServerCallback callback)Authenticate the user with a custom Email and Password.voidresetEmailPasswordAdvancedWithExpiry(String email, String serviceParams, Integer tokenTtlInMinutes, IServerCallback callback)Authenticate the user with a custom Email and Password.voidresetEmailPasswordWithExpiry(String email, int tokenTtlInMinutes, IServerCallback callback)Authenticate the user with a custom Email and Password.voidresetStoredAnonymousId()Resets the anonymous id to empty stringprotected voidresetStoredAuthenticationType()voidresetStoredProfileId()Resets the profile id to empty stringvoidresetUniversalIdPassword(String universalId, IServerCallback callback)Authenticate the user with a custom Email and Password.voidresetUniversalIdPasswordAdvanced(String universalId, String serviceParams, IServerCallback callback)Authenticate the user with a custom Email and Password.voidresetUniversalIdPasswordAdvancedWithExpiry(String universalId, String serviceParams, Integer tokenTtlInMinutes, IServerCallback callback)Authenticate the user with a custom Email and Password.voidresetUniversalIdPasswordWithExpiry(String universalId, int tokenTtlInMinutes, IServerCallback callback)Authenticate the user with a custom Email and Password.voidrunCallbacks()Run callbacks, to be called once per frame from your main threadvoidserverCallback(ServiceName serviceName, ServiceOperation serviceOperation, org.json.JSONObject jsonData)The serverCallback() method returns server data back to the layer interfacing with the BrainCloud library.voidserverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)Errors are returned back to the layer which is interfacing with the BrainCloud library through the serverError() callback.voidsetAlwaysAllowProfileSwitch(boolean alwaysAllow)For non-anonymous authentication methods, a profile id will be passed in when this value is set to false.voidsetReleasePlatform(Platform releasePlatform)voidsetStoredAnonymousId(String anonymousId)Sets the stored anonymous idprotected voidsetStoredAuthenticationType(String authenticationType)voidsetStoredProfileId(String profileId)Sets the stored profile idvoidsmartSwitchAuthenticateAdvanced(AuthenticationType authenticationType, AuthenticationIds ids, boolean forceCreate, String extraJson, IServerCallback callback)voidsmartSwitchAuthenticateApple(String appleUserId, String token, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateEmail(String email, String password, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateExternal(String userId, String token, String externalAuthName, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateFacebook(String fbUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateGoogle(String googleUserId, String serverAuthCode, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateGoogleOpenId(String googleUserAccountEmail, String IdToken, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateOculus(String oculusUserId, String oculusNonce, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateSteam(String steamUserId, String sessionTicket, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateTwitter(String userId, String token, String secret, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateUltra(String ultraUserId, String ultraIdToken, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateUniversal(String userId, String password, boolean forceCreate, IServerCallback callback)
-
Constructor Details
-
BrainCloudWrapper
public BrainCloudWrapper() -
BrainCloudWrapper
Instantiate a copy of the brainCloud wrapper. Don't use getInstance if creating your own copy.- Parameters:
wrapperName- value used to differentiate saved wrapper data
-
-
Method Details
-
getReleasePlatform
- Specified by:
getReleasePlatformin interfaceIBrainCloudWrapper
-
setReleasePlatform
- Specified by:
setReleasePlatformin interfaceIBrainCloudWrapper
-
getClient
Returns a singleton instance of the BrainCloudClient, if this is the BrainCloudWrapper Singleton. Otherwise, return an instance of the BrainCloudClient, if this is an instance of the BrainCloudWrapper.- Specified by:
getClientin interfaceIBrainCloudWrapper- Returns:
- A singleton instance of the BrainCloudClient.
-
initialize
Method initializes the BrainCloudClient.- Specified by:
initializein interfaceIBrainCloudWrapper- Parameters:
appId- The app idsecretKey- The secret key for your appappVersion- The app version
-
initialize
Method initializes the BrainCloudClient.- Specified by:
initializein interfaceIBrainCloudWrapper- Parameters:
appId- The app idsecretKey- The secret key for your appappVersion- The app versionserverUrl- The url to the brainCloud server
-
initializeIdentity
protected void initializeIdentity(boolean isAnonymousAuth) -
getStoredProfileId
Returns the stored profile id- Specified by:
getStoredProfileIdin interfaceIBrainCloudWrapper- Returns:
- The stored profile id
-
setStoredProfileId
Sets the stored profile id- Specified by:
setStoredProfileIdin interfaceIBrainCloudWrapper- Parameters:
profileId- The profile id to set
-
resetStoredProfileId
public void resetStoredProfileId()Resets the profile id to empty string- Specified by:
resetStoredProfileIdin interfaceIBrainCloudWrapper
-
setStoredAnonymousId
Sets the stored anonymous id- Specified by:
setStoredAnonymousIdin interfaceIBrainCloudWrapper- Parameters:
anonymousId- The anonymous id to set
-
resetStoredAnonymousId
public void resetStoredAnonymousId()Resets the anonymous id to empty string- Specified by:
resetStoredAnonymousIdin interfaceIBrainCloudWrapper
-
setAlwaysAllowProfileSwitch
public void setAlwaysAllowProfileSwitch(boolean alwaysAllow)For non-anonymous authentication methods, a profile id will be passed in when this value is set to false. This will generate an error on the server if the profile id passed in does not match the profile associated with the authentication credentials. By default, this value is true.- Specified by:
setAlwaysAllowProfileSwitchin interfaceIBrainCloudWrapper- Parameters:
alwaysAllow- Controls whether the profile id is passed in with non-anonymous authentications.
-
getAlwaysAllowProfileSwitch
public boolean getAlwaysAllowProfileSwitch()Returns the value for always allow profile switch- Specified by:
getAlwaysAllowProfileSwitchin interfaceIBrainCloudWrapper- Returns:
- Whether to always allow profile switches
-
getStoredAuthenticationType
-
setStoredAuthenticationType
-
resetStoredAuthenticationType
protected void resetStoredAuthenticationType() -
authenticateAnonymous
Authenticate a user anonymously with brainCloud - used for apps that don't want to bother the user to login, or for users who are sensitive to their privacy- Specified by:
authenticateAnonymousin interfaceIBrainCloudWrapper- Parameters:
callback- The callback handler
-
authenticateHandoff
Authenticate the user using a handoffId and an authentication token.- Specified by:
authenticateHandoffin interfaceIBrainCloudWrapper- Parameters:
handoffId- braincloud handoffId generated frim cloud scriptsecurityToken- The authentication tokencallback- The callback handler
-
authenticateSettopHandoff
Authenticate the user using a handoffId and an authentication token.- Specified by:
authenticateSettopHandoffin interfaceIBrainCloudWrapper- Parameters:
handoffCode- generate in cloud codecallback- The callback handler
-
authenticateEmailPassword
public void authenticateEmailPassword(String email, String password, boolean forceCreate, IServerCallback callback)Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).Note that the password sent from the client to the server is protected via SSL.
- Specified by:
authenticateEmailPasswordin interfaceIBrainCloudWrapper- Parameters:
email- The e-mail address of the userpassword- The password of the userforceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateExternal
public void authenticateExternal(String userId, String token, String externalAuthName, boolean forceCreate, IServerCallback callback)Authenticate the user via cloud code (which in turn validates the supplied credentials against an external system). This allows the developer to extend brainCloud authentication to support other backend authentication systems.Service Name - Authenticate Server Operation - Authenticate
- Specified by:
authenticateExternalin interfaceIBrainCloudWrapper- Parameters:
userId- The user idtoken- The user token (password etc)externalAuthName- The name of the cloud script to call for external authenticationforceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateFacebook
public void authenticateFacebook(String fbUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)Authenticate the user with brainCloud using their Facebook Credentials- Specified by:
authenticateFacebookin interfaceIBrainCloudWrapper- Parameters:
fbUserId- The facebook id of the userfbAuthToken- The validated token from the Facebook SDK (that will be further validated when sent to the bC service)forceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateFacebookLimited
public void authenticateFacebookLimited(String fbLimitedUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)Authenticate the user with brainCloud using their FacebookLimited Credentials- Specified by:
authenticateFacebookLimitedin interfaceIBrainCloudWrapper- Parameters:
fbLimitedUserId- The facebookLimited id of the userfbAuthToken- The validated token from the Facebook SDK (that will be further validated when sent to the bC service)forceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateGoogle
public void authenticateGoogle(String googleUserId, String googleAuthToken, boolean forceCreate, IServerCallback callback)Authenticate the user using a google userid(email address) and google authentication token.- Specified by:
authenticateGooglein interfaceIBrainCloudWrapper- Parameters:
googleUserId- String representation of google+ userid (email)googleAuthToken- The authentication token derived via the google apis.forceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateGoogleOpenId
public void authenticateGoogleOpenId(String googleOpenId, String googleAuthToken, boolean forceCreate, IServerCallback callback)Authenticate the user using a google userid(email address) and google authentication token.- Specified by:
authenticateGoogleOpenIdin interfaceIBrainCloudWrapper- Parameters:
googleOpenId- String representation of google+ userid (email)googleAuthToken- The authentication token derived via the google apis.forceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateApple
public void authenticateApple(String appleUserId, String token, boolean forceCreate, IServerCallback callback)Authenticate the user using an apple userid(email address) and apple authentication token.- Specified by:
authenticateApplein interfaceIBrainCloudWrapper- Parameters:
appleUserId- String representation of apple userid (email)token- The authentication token derived via the apple apis.forceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateSteam
public void authenticateSteam(String steamUserId, String steamSessionTicket, boolean forceCreate, IServerCallback callback)Authenticate the user using a steam userid and session ticket (without any validation on the userid).- Specified by:
authenticateSteamin interfaceIBrainCloudWrapper- Parameters:
steamUserId- String representation of 64 bit steam idsteamSessionTicket- The session ticket of the user (hex encoded)forceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateUltra
public void authenticateUltra(String ultraUsername, String ultraIdToken, boolean forceCreate, IServerCallback callback)Authenticate the user for Ultra.- Specified by:
authenticateUltrain interfaceIBrainCloudWrapper- Parameters:
ultraUsername- it's what the user uses to log into the Ultra endpoint initiallyultraIdToken- The "id_token" taken from Ultra's JWT.forceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateTwitter
public void authenticateTwitter(String userId, String token, String secret, boolean forceCreate, IServerCallback callback)Authenticate the user using a Twitter userid, authentication token, and secret from Twitter.Service Name - Authenticate Service Operation - Authenticate
- Specified by:
authenticateTwitterin interfaceIBrainCloudWrapper- Parameters:
userId- String representation of Twitter useridtoken- The authentication token derived via the Twitter apis.secret- The secret given when attempting to link with TwitterforceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateUniversal
public void authenticateUniversal(String userId, String userPassword, boolean forceCreate, IServerCallback callback)Authenticate the user using a userid and password (without any validation on the userid). Similar to AuthenticateEmailPassword - except that that method has additional features to allow for e-mail validation, password resets, etc.- Specified by:
authenticateUniversalin interfaceIBrainCloudWrapper- Parameters:
userId- The e-mail address of the useruserPassword- The password of the userforceCreate- Should a new profile be created for this user if the account does not exist?callback- The callback handler
-
authenticateAdvanced
public void authenticateAdvanced(AuthenticationType authenticationType, AuthenticationIds ids, boolean forceCreate, String extraJson, IServerCallback callback)- Specified by:
authenticateAdvancedin interfaceIBrainCloudWrapper
-
reconnect
Re-authenticates the user with brainCloud- Specified by:
reconnectin interfaceIBrainCloudWrapper- Parameters:
callback- The callback handler
-
resetEmailPassword
Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).Note that the password sent from the client to the server is protected via SSL.
- Specified by:
resetEmailPasswordin interfaceIBrainCloudWrapper- Parameters:
email- The e-mail address of the usercallback- The callback handler
-
resetEmailPasswordAdvanced
public void resetEmailPasswordAdvanced(String email, String serviceParams, IServerCallback callback)Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).Note that the password sent from the client to the server is protected via SSL.
- Specified by:
resetEmailPasswordAdvancedin interfaceIBrainCloudWrapper- Parameters:
email- The e-mail address of the userserviceParams- Set of parameters dependant on the mail service configured.callback- The callback handler
-
resetEmailPasswordWithExpiry
public void resetEmailPasswordWithExpiry(String email, int tokenTtlInMinutes, IServerCallback callback)Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).Note that the password sent from the client to the server is protected via SSL.
- Specified by:
resetEmailPasswordWithExpiryin interfaceIBrainCloudWrapper- Parameters:
email- The e-mail address of the usertokenTtlInMinutes- The token expiry timecallback- The callback handler
-
resetEmailPasswordAdvancedWithExpiry
public void resetEmailPasswordAdvancedWithExpiry(String email, String serviceParams, Integer tokenTtlInMinutes, IServerCallback callback)Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).Note that the password sent from the client to the server is protected via SSL.
- Specified by:
resetEmailPasswordAdvancedWithExpiryin interfaceIBrainCloudWrapper- Parameters:
email- The e-mail address of the userserviceParams- Set of parameters dependant on the mail service configured.tokenTtlInMinutes- Token expiry timecallback- The callback handler
-
resetUniversalIdPassword
Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).Note that the password sent from the client to the server is protected via SSL.
- Specified by:
resetUniversalIdPasswordin interfaceIBrainCloudWrapper- Parameters:
universalId- The e-mail address of the usercallback- The callback handler
-
resetUniversalIdPasswordAdvanced
public void resetUniversalIdPasswordAdvanced(String universalId, String serviceParams, IServerCallback callback)Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).Note that the password sent from the client to the server is protected via SSL.
- Specified by:
resetUniversalIdPasswordAdvancedin interfaceIBrainCloudWrapper- Parameters:
universalId- The e-mail address of the userserviceParams- Set of parameters dependant on the mail service configured.callback- The callback handler
-
resetUniversalIdPasswordWithExpiry
public void resetUniversalIdPasswordWithExpiry(String universalId, int tokenTtlInMinutes, IServerCallback callback)Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).Note that the password sent from the client to the server is protected via SSL.
- Specified by:
resetUniversalIdPasswordWithExpiryin interfaceIBrainCloudWrapper- Parameters:
universalId- The e-mail address of the usertokenTtlInMinutes- Token expiry timecallback- The callback handler
-
resetUniversalIdPasswordAdvancedWithExpiry
public void resetUniversalIdPasswordAdvancedWithExpiry(String universalId, String serviceParams, Integer tokenTtlInMinutes, IServerCallback callback)Authenticate the user with a custom Email and Password. Note that the client app is responsible for collecting (and storing) the e-mail and potentially password (for convenience) in the client data. For the greatest security, force the user to re-enter their * password at each login. (Or at least give them that option).Note that the password sent from the client to the server is protected via SSL.
- Specified by:
resetUniversalIdPasswordAdvancedWithExpiryin interfaceIBrainCloudWrapper- Parameters:
universalId- The e-mail address of the userserviceParams- Set of parameters dependant on the mail service configured.tokenTtlInMinutes- Token expiry timecallback- The callback handler
-
smartSwitchAuthenticateEmail
public void smartSwitchAuthenticateEmail(String email, String password, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateEmailin interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateExternal
public void smartSwitchAuthenticateExternal(String userId, String token, String externalAuthName, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateExternalin interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateFacebook
public void smartSwitchAuthenticateFacebook(String fbUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateFacebookin interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateOculus
public void smartSwitchAuthenticateOculus(String oculusUserId, String oculusNonce, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateOculusin interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateGoogle
public void smartSwitchAuthenticateGoogle(String googleUserId, String serverAuthCode, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateGooglein interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateGoogleOpenId
public void smartSwitchAuthenticateGoogleOpenId(String googleUserAccountEmail, String IdToken, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateGoogleOpenIdin interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateApple
public void smartSwitchAuthenticateApple(String appleUserId, String token, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateApplein interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateSteam
public void smartSwitchAuthenticateSteam(String steamUserId, String sessionTicket, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateSteamin interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateTwitter
public void smartSwitchAuthenticateTwitter(String userId, String token, String secret, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateTwitterin interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateUniversal
public void smartSwitchAuthenticateUniversal(String userId, String password, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateUniversalin interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateUltra
public void smartSwitchAuthenticateUltra(String ultraUserId, String ultraIdToken, boolean forceCreate, IServerCallback callback)- Specified by:
smartSwitchAuthenticateUltrain interfaceIBrainCloudWrapper
-
smartSwitchAuthenticateAdvanced
public void smartSwitchAuthenticateAdvanced(AuthenticationType authenticationType, AuthenticationIds ids, boolean forceCreate, String extraJson, IServerCallback callback)- Specified by:
smartSwitchAuthenticateAdvancedin interfaceIBrainCloudWrapper
-
runCallbacks
public void runCallbacks()Run callbacks, to be called once per frame from your main thread- Specified by:
runCallbacksin interfaceIBrainCloudWrapper
-
serverCallback
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, org.json.JSONObject jsonData)The serverCallback() method returns server data back to the layer interfacing with the BrainCloud library.- Specified by:
serverCallbackin interfaceIBrainCloudWrapper- Specified by:
serverCallbackin interfaceIServerCallback- Parameters:
serviceName- - name of the requested serviceserviceOperation- - requested operationjsonData- - returned data from the server
-
serverError
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)Errors are returned back to the layer which is interfacing with the BrainCloud library through the serverError() callback.A server error might indicate a failure of the client to communicate with the server after N retries.
- Specified by:
serverErrorin interfaceIBrainCloudWrapper- Specified by:
serverErrorin interfaceIServerCallback- Parameters:
serviceName- - name of the requested serviceserviceOperation- - requested operationstatusCode- The error status return code (400, 403, 500, etc)reasonCode- The brainCloud reason code (see reason codes on apidocs site)jsonError- The error json string
-
getAppStoreService
- Specified by:
getAppStoreServicein interfaceIBrainCloudWrapper
-
getAsyncMatchService
- Specified by:
getAsyncMatchServicein interfaceIBrainCloudWrapper
-
getAuthenticationService
- Specified by:
getAuthenticationServicein interfaceIBrainCloudWrapper
-
getChatService
- Specified by:
getChatServicein interfaceIBrainCloudWrapper
-
getLobbyService
- Specified by:
getLobbyServicein interfaceIBrainCloudWrapper
-
getDataStreamService
- Specified by:
getDataStreamServicein interfaceIBrainCloudWrapper
-
getEntityService
- Specified by:
getEntityServicein interfaceIBrainCloudWrapper
-
getEventService
- Specified by:
getEventServicein interfaceIBrainCloudWrapper
-
getFileService
- Specified by:
getFileServicein interfaceIBrainCloudWrapper
-
getFriendService
- Specified by:
getFriendServicein interfaceIBrainCloudWrapper
-
getGamificationService
- Specified by:
getGamificationServicein interfaceIBrainCloudWrapper
-
getGlobalAppService
- Specified by:
getGlobalAppServicein interfaceIBrainCloudWrapper
-
getGlobalEntityService
- Specified by:
getGlobalEntityServicein interfaceIBrainCloudWrapper
-
getGlobalStatisticsService
- Specified by:
getGlobalStatisticsServicein interfaceIBrainCloudWrapper
-
getGroupService
- Specified by:
getGroupServicein interfaceIBrainCloudWrapper
-
getGroupFileService
- Specified by:
getGroupFileServicein interfaceIBrainCloudWrapper
-
getIdentityService
- Specified by:
getIdentityServicein interfaceIBrainCloudWrapper
-
getMailService
- Specified by:
getMailServicein interfaceIBrainCloudWrapper
-
getMessagingService
- Specified by:
getMessagingServicein interfaceIBrainCloudWrapper
-
getMatchMakingService
- Specified by:
getMatchMakingServicein interfaceIBrainCloudWrapper
-
getOneWayMatchService
- Specified by:
getOneWayMatchServicein interfaceIBrainCloudWrapper
-
getPlaybackStreamService
- Specified by:
getPlaybackStreamServicein interfaceIBrainCloudWrapper
-
getPlayerStateService
- Specified by:
getPlayerStateServicein interfaceIBrainCloudWrapper
-
getPlayerStatisticsService
- Specified by:
getPlayerStatisticsServicein interfaceIBrainCloudWrapper
-
getPlayerStatisticsEventService
- Specified by:
getPlayerStatisticsEventServicein interfaceIBrainCloudWrapper
-
getPresenceService
- Specified by:
getPresenceServicein interfaceIBrainCloudWrapper
-
getVirtualCurrencyService
- Specified by:
getVirtualCurrencyServicein interfaceIBrainCloudWrapper
-
getProfanityService
- Specified by:
getProfanityServicein interfaceIBrainCloudWrapper
-
getPushNotificationService
- Specified by:
getPushNotificationServicein interfaceIBrainCloudWrapper
-
getRedemptionCodeService
- Specified by:
getRedemptionCodeServicein interfaceIBrainCloudWrapper
-
getRelayService
- Specified by:
getRelayServicein interfaceIBrainCloudWrapper
-
getRTTService
- Specified by:
getRTTServicein interfaceIBrainCloudWrapper
-
getS3HandlingService
- Specified by:
getS3HandlingServicein interfaceIBrainCloudWrapper
-
getScriptService
- Specified by:
getScriptServicein interfaceIBrainCloudWrapper
-
getSocialLeaderboardService
- Specified by:
getSocialLeaderboardServicein interfaceIBrainCloudWrapper
-
getLeaderboardService
- Specified by:
getLeaderboardServicein interfaceIBrainCloudWrapper
-
getTimeService
- Specified by:
getTimeServicein interfaceIBrainCloudWrapper
-
getTournamentService
- Specified by:
getTournamentServicein interfaceIBrainCloudWrapper
-
getGlobalFileService
- Specified by:
getGlobalFileServicein interfaceIBrainCloudWrapper
-
getCustomEntityService
- Specified by:
getCustomEntityServicein interfaceIBrainCloudWrapper
-
getItemCatalogService
- Specified by:
getItemCatalogServicein interfaceIBrainCloudWrapper
-
getUserItemsService
- Specified by:
getUserItemsServicein interfaceIBrainCloudWrapper
-