-
- All Implemented Interfaces:
-
com.bitheads.braincloud.client.IBrainCloudWrapper,com.bitheads.braincloud.client.IServerCallback
public class BrainCloudWrapperAndroid implements IServerCallback, IBrainCloudWrapperThe BrainCloudWrapper provides some convenience functionality to developers when they are getting started with the authentication system.
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 BrainCloudWrapperAndroid()BrainCloudWrapperAndroid(String wrapperName)Instantiate a copy of the brainCloud wrapper.
-
Method Summary
Modifier and Type Method Description PlatformgetReleasePlatform()voidsetReleasePlatform(Platform releasePlatform)BrainCloudClientgetClient()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. static BrainCloudWrapperAndroidgetInstance()Method returns a singleton instance of the BrainCloudWrapper. static BrainCloudClientgetBC()Returns a singleton instance of the BrainCloudClient. voidsetContext(Context ctx)Sets the context required for saving anonymous and profile ids to theprivate SharedPreferences file. voidinitialize(Context ctx, String appId, String secretKey, String appVersion)Method initializes the BrainCloudClient. voidinitialize(Context ctx, String appId, String secretKey, String appVersion, String serverUrl)Method initializes the BrainCloudClient. voidinitialize(String appId, String secretKey, String appVersion, String serverUrl)Method initializes the BrainCloudClient. voidinitialize(String appId, String secretKey, String appVersion)Method initializes the BrainCloudClient. voidinitializeWithApps(String url, String appId, Map<String, String> secretMap, String version, String companyName, String appName)voidinitializeWithApps(String url, String defaultAppId, Map<String, String> secretMap, String version)Method initializes the BrainCloudClient. StringgetStoredProfileId()Returns the stored profile id voidsetStoredProfileId(String profileId)Sets the stored profile id voidresetStoredProfileId()Resets the profile id to empty string voidsetStoredAnonymousId(String anonymousId)Sets the stored anonymous id voidresetStoredAnonymousId()Resets the anonymous id to empty string voidsetAlwaysAllowProfileSwitch(boolean alwaysAllow)For non-anonymous authentication methods, a profile id will be passed inwhen this value is set to false. booleangetAlwaysAllowProfileSwitch()Returns the value for always allow profile switch voidauthenticateAnonymous(IServerCallback callback)Authenticate a user anonymously with brainCloud - used for apps thatdon't want to bother the user to login, or for users who are sensitive totheir privacy 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. 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).This allows the developer to extend brainCloud authentication to support other backend authentication systems. voidauthenticateFacebook(String fbUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)Authenticate the user with brainCloud using their Facebook Credentials voidauthenticateFacebookLimited(String fbLimitedUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)Authenticate the user with brainCloud using their FacebookLimited Credentials voidauthenticateOculus(String oculusUserId, String oculusNonce, boolean forceCreate, IServerCallback callback)Authenticate the user with brainCloud using their Oculus Credentials voidauthenticateApple(String appleUserId, String identityToken, boolean forceCreate, IServerCallback callback)Authenticate the user using an apple id voidauthenticateGoogle(String googleUserId, String serverAuthCode, boolean forceCreate, IServerCallback callback)Authenticate the user using a google userid(email address) and googleauthentication token. voidauthenticateGoogleOpenId(String googleUserAccountEmail, String IdToken, boolean forceCreate, IServerCallback callback)Authenticate the user using a google openId voidauthenticateSteam(String steamUserId, String steamSessionTicket, boolean forceCreate, IServerCallback callback)Authenticate the user using a steam userid and session ticket (withoutany validation on the userid). voidauthenticateUltra(String ultraUsername, String ultraIdToken, boolean forceCreate, IServerCallback callback)Authenticate the user for Ultra. voidauthenticateTwitter(String userId, String token, String secret, boolean forceCreate, IServerCallback callback)Authenticate the user using a Twitter userid, authentication token, and secret from Twitter. voidauthenticateUniversal(String userId, String userPassword, boolean forceCreate, IServerCallback callback)Authenticate the user using a userid and password (without any validationon the userid). voidauthenticateAdvanced(AuthenticationType authenticationType, AuthenticationIds ids, boolean forceCreate, String extraJson, 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)voidsmartSwitchAuthenticateOculus(String oculusUserId, String oculusNonce, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateGoogle(String googleUserId, String serverAuthCode, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateGoogleOpenId(String googleUserAccountEmail, String IdToken, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateApple(String appleUserId, String token, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateSteam(String steamUserId, String sessionTicket, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateTwitter(String userId, String token, String secret, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateUniversal(String userId, String password, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateUltra(String ultraUserId, String ultraIdToken, boolean forceCreate, IServerCallback callback)voidsmartSwitchAuthenticateAdvanced(AuthenticationType authenticationType, AuthenticationIds ids, boolean forceCreate, String extraJson, IServerCallback callback)voidreconnect(IServerCallback callback)Re-authenticates the user with brainCloud voidresetEmailPassword(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. voidresetEmailPasswordWithExpiry(String email, int tokenTtlInMinutes, 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. voidresetUniversalIdPassword(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. voidresetUniversalIdPasswordWithExpiry(String universalId, int tokenTtlInMinutes, 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. voidrunCallbacks()Run callbacks, to be called once per frame from your main thread voidenableCompression()Enable compression in comms transactions voiddisableCompression()Disable compression in comms transactions voidserverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)The serverCallback() method returns server data back to the layerinterfacing 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 theBrainCloud library through the serverError() callback. AppStoreServicegetAppStoreService()AsyncMatchServicegetAsyncMatchService()AuthenticationServicegetAuthenticationService()ChatServicegetChatService()DataStreamServicegetDataStreamService()EntityServicegetEntityService()EventServicegetEventService()FileServicegetFileService()FriendServicegetFriendService()GamificationServicegetGamificationService()GlobalAppServicegetGlobalAppService()GlobalEntityServicegetGlobalEntityService()GlobalStatisticsServicegetGlobalStatisticsService()GroupServicegetGroupService()GroupFileServicegetGroupFileService()IdentityServicegetIdentityService()LobbyServicegetLobbyService()MailServicegetMailService()MessagingServicegetMessagingService()MatchMakingServicegetMatchMakingService()OneWayMatchServicegetOneWayMatchService()PlaybackStreamServicegetPlaybackStreamService()PlayerStateServicegetPlayerStateService()PlayerStatisticsServicegetPlayerStatisticsService()PlayerStatisticsEventServicegetPlayerStatisticsEventService()PresenceServicegetPresenceService()VirtualCurrencyServicegetVirtualCurrencyService()ProfanityServicegetProfanityService()PushNotificationServicegetPushNotificationService()RedemptionCodeServicegetRedemptionCodeService()RelayServicegetRelayService()RTTServicegetRTTService()S3HandlingServicegetS3HandlingService()ScriptServicegetScriptService()SocialLeaderboardServicegetSocialLeaderboardService()SocialLeaderboardServicegetLeaderboardService()TimeServicegetTimeService()TournamentServicegetTournamentService()GlobalFileServicegetGlobalFileService()CustomEntityServicegetCustomEntityService()ItemCatalogServicegetItemCatalogService()UserItemsServicegetUserItemsService()-
Methods inherited from class com.bitheads.braincloud.client.IServerCallback
serverCallback, serverError -
Methods inherited from class com.bitheads.braincloud.client.IBrainCloudWrapper
authenticateAdvanced, authenticateAnonymous, authenticateApple, authenticateEmailPassword, authenticateExternal, authenticateFacebook, authenticateFacebookLimited, authenticateGoogle, authenticateGoogleOpenId, authenticateHandoff, authenticateSettopHandoff, authenticateSteam, authenticateTwitter, authenticateUltra, authenticateUniversal, getAlwaysAllowProfileSwitch, getAppStoreService, getAsyncMatchService, getAuthenticationService, getChatService, getClient, getCustomEntityService, getDataStreamService, getEntityService, getEventService, getFileService, getFriendService, getGamificationService, getGlobalAppService, getGlobalEntityService, getGlobalFileService, getGlobalStatisticsService, getGroupFileService, getGroupService, getIdentityService, getItemCatalogService, getLeaderboardService, getLobbyService, getMailService, getMatchMakingService, getMessagingService, getOneWayMatchService, getPlaybackStreamService, getPlayerStateService, getPlayerStatisticsEventService, getPlayerStatisticsService, getPresenceService, getProfanityService, getPushNotificationService, getRTTService, getRedemptionCodeService, getRelayService, getReleasePlatform, getS3HandlingService, getScriptService, getSocialLeaderboardService, getStoredProfileId, getTimeService, getTournamentService, getUserItemsService, getVirtualCurrencyService, initialize, reconnect, resetEmailPassword, resetEmailPasswordAdvanced, resetEmailPasswordAdvancedWithExpiry, resetEmailPasswordWithExpiry, resetStoredAnonymousId, resetStoredProfileId, resetUniversalIdPassword, resetUniversalIdPasswordAdvanced, resetUniversalIdPasswordAdvancedWithExpiry, resetUniversalIdPasswordWithExpiry, runCallbacks, setAlwaysAllowProfileSwitch, setReleasePlatform, setStoredAnonymousId, setStoredProfileId, smartSwitchAuthenticateAdvanced, smartSwitchAuthenticateApple, smartSwitchAuthenticateEmail, smartSwitchAuthenticateExternal, smartSwitchAuthenticateFacebook, smartSwitchAuthenticateGoogle, smartSwitchAuthenticateGoogleOpenId, smartSwitchAuthenticateOculus, smartSwitchAuthenticateSteam, smartSwitchAuthenticateTwitter, smartSwitchAuthenticateUltra, smartSwitchAuthenticateUniversal -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BrainCloudWrapperAndroid
BrainCloudWrapperAndroid()
-
BrainCloudWrapperAndroid
BrainCloudWrapperAndroid(String wrapperName)
Instantiate a copy of the brainCloud wrapper.- Parameters:
wrapperName- value used to differentiate saved wrapper data
-
-
Method Detail
-
getReleasePlatform
Platform getReleasePlatform()
-
setReleasePlatform
void setReleasePlatform(Platform releasePlatform)
-
getClient
BrainCloudClient 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.
-
getInstance
static BrainCloudWrapperAndroid getInstance()
Method returns a singleton instance of the BrainCloudWrapper.
-
getBC
static BrainCloudClient getBC()
Returns a singleton instance of the BrainCloudClient.
-
setContext
void setContext(Context ctx)
Sets the context required for saving anonymous and profile ids to theprivate SharedPreferences file.
- Parameters:
ctx- The application context
-
initialize
void initialize(Context ctx, String appId, String secretKey, String appVersion)
Method initializes the BrainCloudClient.
- Parameters:
ctx- The application contextappId- The app idsecretKey- The secret key for your appappVersion- The app version
-
initialize
void initialize(Context ctx, String appId, String secretKey, String appVersion, String serverUrl)
Method initializes the BrainCloudClient.
- Parameters:
ctx- The application contextappId- The app idsecretKey- The secret key for your appappVersion- The app versionserverUrl- The url to the brainCloud server
-
initialize
void initialize(String appId, String secretKey, String appVersion, String serverUrl)
Method initializes the BrainCloudClient. Make sure toset the context via setContext() if you're using this method.
- Parameters:
appId- The app idsecretKey- The secret key for your appappVersion- The app versionserverUrl- The url to the brainCloud server
-
initialize
void initialize(String appId, String secretKey, String appVersion)
Method initializes the BrainCloudClient. Make sure toset the context via setContext() if you're using this method.
- Parameters:
appId- The app idsecretKey- The secret key for your appappVersion- The app version
-
initializeWithApps
void initializeWithApps(String url, String appId, Map<String, String> secretMap, String version, String companyName, String appName)
-
initializeWithApps
void initializeWithApps(String url, String defaultAppId, Map<String, String> secretMap, String version)
Method initializes the BrainCloudClient. - Note this is here for toggling purposes to testdifferent initializations.
- Parameters:
url- The URL to the brainCloud serverdefaultAppId- The default app IDsecretMap- All app ids to secret keys used by this applicationversion- The app version
-
getStoredProfileId
String getStoredProfileId()
Returns the stored profile id
-
setStoredProfileId
void setStoredProfileId(String profileId)
Sets the stored profile id
- Parameters:
profileId- The profile id to set
-
resetStoredProfileId
void resetStoredProfileId()
Resets the profile id to empty string
-
setStoredAnonymousId
void setStoredAnonymousId(String anonymousId)
Sets the stored anonymous id
- Parameters:
anonymousId- The anonymous id to set
-
resetStoredAnonymousId
void resetStoredAnonymousId()
Resets the anonymous id to empty string
-
setAlwaysAllowProfileSwitch
void setAlwaysAllowProfileSwitch(boolean alwaysAllow)
For non-anonymous authentication methods, a profile id will be passed inwhen this value is set to false. This will generate an error on the serverif the profile id passed in does not match the profile associated with theauthentication credentials. By default, this value is true.
- Parameters:
alwaysAllow- Controls whether the profile id is passed in withnon-anonymous authentications.
-
getAlwaysAllowProfileSwitch
boolean getAlwaysAllowProfileSwitch()
Returns the value for always allow profile switch
-
authenticateAnonymous
void authenticateAnonymous(IServerCallback callback)
Authenticate a user anonymously with brainCloud - used for apps thatdon't want to bother the user to login, or for users who are sensitive totheir privacy
- Parameters:
callback- The callback handler
-
authenticateHandoff
void authenticateHandoff(String handoffId, String securityToken, IServerCallback callback)
Authenticate the user using a handoffId and an authentication token.
- Parameters:
handoffId- braincloud handoffId generated frim cloud scriptsecurityToken- The authentication tokencallback- The callback handler
-
authenticateSettopHandoff
void authenticateSettopHandoff(String handoffCode, IServerCallback callback)
Authenticate the user using a handoffId and an authentication token.
- Parameters:
handoffCode- generate in cloud codecallback- The callback handler
-
authenticateEmailPassword
void authenticateEmailPassword(String email, String password, boolean forceCreate, IServerCallback callback)
Authenticate the user with a custom Email and Password. Note that theclient app is responsible for collecting (and storing) the e-mail andpotentially password (for convenience) in the client data. For thegreatest security, force the user to re-enter their * password at eachlogin. (Or at least give them that option).
Note that the password sent from the client to the server is protectedvia SSL.
- 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 accountdoes not exist?callback- The callback handler
-
authenticateExternal
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 - AuthenticateServer Operation - Authenticate
- 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 accountdoes not exist?
-
authenticateFacebook
void authenticateFacebook(String fbUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)
Authenticate the user with brainCloud using their Facebook Credentials
- Parameters:
fbUserId- The facebook id of the userfbAuthToken- The validated token from the Facebook SDK (that will befurther validated when sent to the bC service)forceCreate- Should a new profile be created for this user if the accountdoes not exist?callback- The callback handler
-
authenticateFacebookLimited
void authenticateFacebookLimited(String fbLimitedUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)
Authenticate the user with brainCloud using their FacebookLimited Credentials
- Parameters:
fbLimitedUserId- The facebookLimited id of the userfbAuthToken- The validated token from the Facebook SDK (that will befurther validated when sent to the bC service)forceCreate- Should a new profile be created for this user if the accountdoes not exist?callback- The callback handler
-
authenticateOculus
void authenticateOculus(String oculusUserId, String oculusNonce, boolean forceCreate, IServerCallback callback)
Authenticate the user with brainCloud using their Oculus Credentials
- Parameters:
oculusUserId- The oculus id of the useroculusNonce- from the Oculus SDK (that will befurther validated when sent to the bC service)forceCreate- Should a new profile be created for this user if the accountdoes not exist?callback- The callback handler
-
authenticateApple
void authenticateApple(String appleUserId, String identityToken, boolean forceCreate, IServerCallback callback)
Authenticate the user using an apple id
- Parameters:
appleUserId- This can be the user id OR the email of the user for the accountidentityToken- The token confirming the user's identityforceCreate- Should a new profile be created for this user if the accountdoes not exist?callback- The callback handler
-
authenticateGoogle
void authenticateGoogle(String googleUserId, String serverAuthCode, boolean forceCreate, IServerCallback callback)
Authenticate the user using a google userid(email address) and googleauthentication token.
- Parameters:
googleUserId- String representation of google+ userId.serverAuthCode- The server authentication token derived via the google apis.forceCreate- Should a new profile be created for this user if the accountdoes not exist?callback- The callback handler
-
authenticateGoogleOpenId
void authenticateGoogleOpenId(String googleUserAccountEmail, String IdToken, boolean forceCreate, IServerCallback callback)
Authenticate the user using a google openId
- Parameters:
googleUserAccountEmail- The email associated with the google userIdToken- The id token of the google account.forceCreate- Should a new profile be created for this user if the accountdoes not exist?callback- The callback handler
-
authenticateSteam
void authenticateSteam(String steamUserId, String steamSessionTicket, boolean forceCreate, IServerCallback callback)
Authenticate the user using a steam userid and session ticket (withoutany validation on the userid).
- 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 accountdoes not exist?callback- The callback handler
-
authenticateUltra
void authenticateUltra(String ultraUsername, String ultraIdToken, boolean forceCreate, IServerCallback callback)
Authenticate the user for Ultra.
- 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 accountdoes not exist?callback- The callback handler
-
authenticateTwitter
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 - AuthenticateService Operation - Authenticate
- 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
void authenticateUniversal(String userId, String userPassword, boolean forceCreate, IServerCallback callback)
Authenticate the user using a userid and password (without any validationon the userid). Similar to AuthenticateEmailPassword - except that thatmethod has additional features to allow for e-mail validation, passwordresets, etc.
- 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 accountdoes not exist?callback- The callback handler
-
authenticateAdvanced
void authenticateAdvanced(AuthenticationType authenticationType, AuthenticationIds ids, boolean forceCreate, String extraJson, IServerCallback callback)
-
smartSwitchAuthenticateEmail
void smartSwitchAuthenticateEmail(String email, String password, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateExternal
void smartSwitchAuthenticateExternal(String userId, String token, String externalAuthName, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateFacebook
void smartSwitchAuthenticateFacebook(String fbUserId, String fbAuthToken, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateOculus
void smartSwitchAuthenticateOculus(String oculusUserId, String oculusNonce, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateGoogle
void smartSwitchAuthenticateGoogle(String googleUserId, String serverAuthCode, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateGoogleOpenId
void smartSwitchAuthenticateGoogleOpenId(String googleUserAccountEmail, String IdToken, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateApple
void smartSwitchAuthenticateApple(String appleUserId, String token, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateSteam
void smartSwitchAuthenticateSteam(String steamUserId, String sessionTicket, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateTwitter
void smartSwitchAuthenticateTwitter(String userId, String token, String secret, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateUniversal
void smartSwitchAuthenticateUniversal(String userId, String password, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateUltra
void smartSwitchAuthenticateUltra(String ultraUserId, String ultraIdToken, boolean forceCreate, IServerCallback callback)
-
smartSwitchAuthenticateAdvanced
void smartSwitchAuthenticateAdvanced(AuthenticationType authenticationType, AuthenticationIds ids, boolean forceCreate, String extraJson, IServerCallback callback)
-
reconnect
void reconnect(IServerCallback callback)
Re-authenticates the user with brainCloud
- Parameters:
callback- The callback handler
-
resetEmailPassword
void resetEmailPassword(String email, IServerCallback callback)
Authenticate the user with a custom Email and Password. Note that theclient app is responsible for collecting (and storing) the e-mail andpotentially password (for convenience) in the client data. For thegreatest security, force the user to re-enter their * password at eachlogin. (Or at least give them that option).
Note that the password sent from the client to the server is protectedvia SSL.
- Parameters:
email- The e-mail address of the usercallback- The callback handler
-
resetEmailPasswordAdvanced
void resetEmailPasswordAdvanced(String email, String serviceParams, IServerCallback callback)
Authenticate the user with a custom Email and Password. Note that theclient app is responsible for collecting (and storing) the e-mail andpotentially password (for convenience) in the client data. For thegreatest security, force the user to re-enter their * password at eachlogin. (Or at least give them that option).
Note that the password sent from the client to the server is protectedvia SSL.
- Parameters:
email- The e-mail address of the userserviceParams- Parameters to send to the email service.callback- The callback handler
-
resetEmailPasswordWithExpiry
void resetEmailPasswordWithExpiry(String email, int tokenTtlInMinutes, IServerCallback callback)
Authenticate the user with a custom Email and Password. Note that theclient app is responsible for collecting (and storing) the e-mail andpotentially password (for convenience) in the client data. For thegreatest security, force the user to re-enter their * password at eachlogin. (Or at least give them that option).
Note that the password sent from the client to the server is protectedvia SSL.
- Parameters:
email- The e-mail address of the usertokenTtlInMinutes- Token expiry timecallback- The callback handler
-
resetEmailPasswordAdvancedWithExpiry
void resetEmailPasswordAdvancedWithExpiry(String email, String serviceParams, Integer tokenTtlInMinutes, IServerCallback callback)
Authenticate the user with a custom Email and Password. Note that theclient app is responsible for collecting (and storing) the e-mail andpotentially password (for convenience) in the client data. For thegreatest security, force the user to re-enter their * password at eachlogin. (Or at least give them that option).
Note that the password sent from the client to the server is protectedvia SSL.
- Parameters:
email- The e-mail address of the userserviceParams- Parameters to send to the email service.tokenTtlInMinutes- Token expiry timecallback- The callback handler
-
resetUniversalIdPassword
void resetUniversalIdPassword(String universalId, IServerCallback callback)
Authenticate the user with a custom Email and Password. Note that theclient app is responsible for collecting (and storing) the e-mail andpotentially password (for convenience) in the client data. For thegreatest security, force the user to re-enter their * password at eachlogin. (Or at least give them that option).
Note that the password sent from the client to the server is protectedvia SSL.
- Parameters:
universalId- The e-mail address of the usercallback- The callback handler
-
resetUniversalIdPasswordAdvanced
void resetUniversalIdPasswordAdvanced(String universalId, String serviceParams, IServerCallback callback)
Authenticate the user with a custom Email and Password. Note that theclient app is responsible for collecting (and storing) the e-mail andpotentially password (for convenience) in the client data. For thegreatest security, force the user to re-enter their * password at eachlogin. (Or at least give them that option).
Note that the password sent from the client to the server is protectedvia SSL.
- Parameters:
universalId- The e-mail address of the userserviceParams- Parameters to send to the email service.callback- The callback handler
-
resetUniversalIdPasswordWithExpiry
void resetUniversalIdPasswordWithExpiry(String universalId, int tokenTtlInMinutes, IServerCallback callback)
Authenticate the user with a custom Email and Password. Note that theclient app is responsible for collecting (and storing) the e-mail andpotentially password (for convenience) in the client data. For thegreatest security, force the user to re-enter their * password at eachlogin. (Or at least give them that option).
Note that the password sent from the client to the server is protectedvia SSL.
- Parameters:
universalId- The e-mail address of the usertokenTtlInMinutes- Token expiry timecallback- The callback handler
-
resetUniversalIdPasswordAdvancedWithExpiry
void resetUniversalIdPasswordAdvancedWithExpiry(String universalId, String serviceParams, Integer tokenTtlInMinutes, IServerCallback callback)
Authenticate the user with a custom Email and Password. Note that theclient app is responsible for collecting (and storing) the e-mail andpotentially password (for convenience) in the client data. For thegreatest security, force the user to re-enter their * password at eachlogin. (Or at least give them that option).
Note that the password sent from the client to the server is protectedvia SSL.
- Parameters:
universalId- The e-mail address of the userserviceParams- parameters to send to the email service.tokenTtlInMinutes- Token expiry timecallback- The callback handler
-
runCallbacks
void runCallbacks()
Run callbacks, to be called once per frame from your main thread
-
enableCompression
void enableCompression()
Enable compression in comms transactions
-
disableCompression
void disableCompression()
Disable compression in comms transactions
-
serverCallback
void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
The serverCallback() method returns server data back to the layerinterfacing with the BrainCloud library.
- Parameters:
serviceName- - name of the requested serviceserviceOperation- - requested operationjsonData- - returned data from the server
-
serverError
void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
Errors are returned back to the layer which is interfacing with theBrainCloud library through the serverError() callback.
A server error might indicate a failure of the client to communicatewith the server after N retries.
- 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
AppStoreService getAppStoreService()
-
getAsyncMatchService
AsyncMatchService getAsyncMatchService()
-
getAuthenticationService
AuthenticationService getAuthenticationService()
-
getChatService
ChatService getChatService()
-
getDataStreamService
DataStreamService getDataStreamService()
-
getEntityService
EntityService getEntityService()
-
getEventService
EventService getEventService()
-
getFileService
FileService getFileService()
-
getFriendService
FriendService getFriendService()
-
getGamificationService
GamificationService getGamificationService()
-
getGlobalAppService
GlobalAppService getGlobalAppService()
-
getGlobalEntityService
GlobalEntityService getGlobalEntityService()
-
getGlobalStatisticsService
GlobalStatisticsService getGlobalStatisticsService()
-
getGroupService
GroupService getGroupService()
-
getGroupFileService
GroupFileService getGroupFileService()
-
getIdentityService
IdentityService getIdentityService()
-
getLobbyService
LobbyService getLobbyService()
-
getMailService
MailService getMailService()
-
getMessagingService
MessagingService getMessagingService()
-
getMatchMakingService
MatchMakingService getMatchMakingService()
-
getOneWayMatchService
OneWayMatchService getOneWayMatchService()
-
getPlaybackStreamService
PlaybackStreamService getPlaybackStreamService()
-
getPlayerStateService
PlayerStateService getPlayerStateService()
-
getPlayerStatisticsService
PlayerStatisticsService getPlayerStatisticsService()
-
getPlayerStatisticsEventService
PlayerStatisticsEventService getPlayerStatisticsEventService()
-
getPresenceService
PresenceService getPresenceService()
-
getVirtualCurrencyService
VirtualCurrencyService getVirtualCurrencyService()
-
getProfanityService
ProfanityService getProfanityService()
-
getPushNotificationService
PushNotificationService getPushNotificationService()
-
getRedemptionCodeService
RedemptionCodeService getRedemptionCodeService()
-
getRelayService
RelayService getRelayService()
-
getRTTService
RTTService getRTTService()
-
getS3HandlingService
S3HandlingService getS3HandlingService()
-
getScriptService
ScriptService getScriptService()
-
getSocialLeaderboardService
SocialLeaderboardService getSocialLeaderboardService()
-
getLeaderboardService
SocialLeaderboardService getLeaderboardService()
-
getTimeService
TimeService getTimeService()
-
getTournamentService
TournamentService getTournamentService()
-
getGlobalFileService
GlobalFileService getGlobalFileService()
-
getCustomEntityService
CustomEntityService getCustomEntityService()
-
getItemCatalogService
ItemCatalogService getItemCatalogService()
-
getUserItemsService
UserItemsService getUserItemsService()
-
-
-
-