Gamebase SDK for Android
1.8.0
Toast Gamebase Platform
|
This class is a wrapper class that is provided to use various features of Gamebase platform. More...
Classes | |
class | Launching |
This class is provided to check information such as launch information, status, and so on. More... | |
class | Network |
This class provides network status information. More... | |
class | Purchase |
This class provides wrapping of function execution related to payment. More... | |
class | Push |
This class provides wrapping of function execution related to push notification. More... | |
class | Util |
This class provides Android utility functions. More... | |
class | WebView |
This class implements the Webview call function. More... | |
Static Public Member Functions | |
static void | activeApp (final Context applicationContext) |
Notifies the Gamebase SDK that the app has launched. More... | |
static void | initialize (final Activity activity, final GamebaseConfiguration configuration, @Nullable final GamebaseDataCallback< LaunchingInfo > callback) |
This function initializes the Gamebase SDK. More... | |
static boolean | isInitialized () |
Check whether the Gamebase is initialized. More... | |
static boolean | isSuccess (GamebaseException exception) |
Returns true if the GamebaseException object is null or the error code is zero. More... | |
static boolean | isDebugMode () |
Indicates if we are in debug mode. More... | |
static void | setDebugMode (boolean enableDebug) |
Used to enable or disable logging, and other debug features. More... | |
static String | getSDKVersion () |
Returns the current version of the Gamebase SDK for Android as a string. More... | |
static boolean | isSandbox () |
Returns whether this project is sandbox mode or not. More... | |
static void | login (@NonNull final Activity activity, final String providerName, @Nullable final GamebaseDataCallback< AuthToken > callback) |
Logs the user in with the external authentication provider. More... | |
static void | login (@NonNull final Activity activity, final String providerName, @Nullable Map< String, Object > additionalInfo, @Nullable final GamebaseDataCallback< AuthToken > callback) |
Logs the user in with the external authentication provider. More... | |
static void | login (@NonNull final Activity activity, @NonNull final Map< String, Object > credentialInfo, @Nullable final GamebaseDataCallback< AuthToken > callback) |
Logs the user in with the credential of external authentication provider. More... | |
static void | loginForLastLoggedInProvider (@NonNull final Activity activity, @Nullable final GamebaseDataCallback< AuthToken > callback) |
Logs the user in with last logged in authentication provider. More... | |
static void | addMapping (@NonNull final Activity activity, final String providerName, @Nullable final GamebaseDataCallback< AuthToken > callback) |
Mapping the currently authenticated user identifier of Gamebase with another external authentication. More... | |
static void | addMapping (@NonNull final Activity activity, @NonNull final Map< String, Object > credentialInfo, @Nullable final GamebaseDataCallback< AuthToken > callback) |
Mapping the currently authenticated user identifier of Gamebase with the credential of external authentication provider. More... | |
static void | addMapping (@NonNull final Activity activity, final String providerName, @Nullable final Map< String, Object > additionalInfo, @Nullable final GamebaseDataCallback< AuthToken > callback) |
Mapping the currently authenticated user identifier of Gamebase with another external authentication. More... | |
static void | removeMapping (@NonNull final Activity activity, final String providerName, @Nullable final GamebaseCallback callback) |
Removes external authentication that is mapped to the current user identifier. More... | |
static void | logout (@NonNull final Activity activity, @Nullable final GamebaseCallback callback) |
Logs out the user. More... | |
static void | withdraw (@NonNull final Activity activity, @Nullable final GamebaseCallback callback) |
Withdraws the user. More... | |
static String | getUserID () |
Gets the user ID that is currently logged in. More... | |
static String | getAccessToken () |
Gets the access token for the current user. More... | |
static String | getLastLoggedInProvider () |
Gets the name of the last logged-in authentication provider. More... | |
static List< String > | getAuthMappingList () |
Gets the list of external authentication providers mapped to the current user identifier. More... | |
static String | getAuthProviderUserID (@NonNull String providerName) |
Gets the user ID from the authentication provider. More... | |
static String | getAuthProviderAccessToken (@NonNull String providerName) |
Gets the access token from the authentication provider. More... | |
static AuthProviderProfile | getAuthProviderProfile (@NonNull String providerName) |
Gets the profile from the authentication provider. More... | |
static AuthBanInfo | getAuthBanInfo () |
Gets the ban information of the suspended user. More... | |
static String | getLanguageCode () |
Gets the language code set for the current device. More... | |
static String | getDeviceLanguageCode () |
Gets the language code set for the current device. More... | |
static String | getDisplayLanguageCode () |
Gets the display language code set for the current device. More... | |
static void | setDisplayLanguageCode (String languageCode) |
static String | getCarrierCode () |
Gets the carrier code set for the current device. More... | |
static String | getCarrierName () |
Gets the carrier name set for the current device. More... | |
static String | getCountryCode () |
Gets the country code. More... | |
static String | getCountryCodeOfUSIM () |
Gets the country code set in USIM. More... | |
static String | getCountryCodeOfDevice () |
Gets the country code currently set on the device. More... | |
static void | onActivityResult (int requestCode, int resultCode, Intent data) |
The method that should be called from the Activity's or Fragment's onActivityResult method. More... | |
static void | addServerPushEvent (ServerPushEvent event) |
Add a server push event listener to be called when server push message is arrived. More... | |
static void | removeServerPushEvent (ServerPushEvent event) |
Remove a server push event listener. More... | |
static void | removeAllServerPushEvent () |
Remove all server push event listeners. More... | |
static void | addObserver (Observer observer) |
Add a observer to be called when network status, launching status or user status is changed. More... | |
static void | removeObserver (Observer observer) |
Remove a observer listener. More... | |
static void | removeAllObserver () |
Remove all observer listeners. More... | |
This class is a wrapper class that is provided to use various features of Gamebase platform.
Provides functions such as authentication, launching, pushing, and billing.
|
static |
Notifies the Gamebase SDK that the app has launched.
It should be called as early as possible.
applicationContext | The application context. |
Example Usage:
|
static |
Mapping the currently authenticated user identifier of Gamebase with another external authentication.
activity | The activity which is starting the mapping process. |
providerName | The providerName which is authentication provider. |
callback | Mapping result callback, returns the authentication token as a result of mapping. |
Example Usage:
|
static |
Mapping the currently authenticated user identifier of Gamebase with the credential of external authentication provider.
activity | The activity which is starting the login process. |
credentialInfo | The credentialInfo which is credential of authentication provider. |
callback | Mapping result callback, returns the authentication token as a result of mapping. |
Example Usage:
|
static |
Mapping the currently authenticated user identifier of Gamebase with another external authentication.
activity | The activity which is starting the mapping process. |
providerName | The providerName which is authentication provider. |
additionalInfo | The additionalInfo which is additional information using for mapping. |
callback | Callbacks the results of mappings, returns the authentication token as a result of mappings. |
Example Usage:
|
static |
Add a observer to be called when network status, launching status or user status is changed.
observer | The callback that will run. |
Example Usage:
|
static |
Add a server push event listener to be called when server push message is arrived.
event | The callback that will run. |
Example Usage:
|
static |
Gets the access token for the current user.
|
static |
Gets the ban information of the suspended user.
|
static |
Gets the list of external authentication providers mapped to the current user identifier.
|
static |
Gets the access token from the authentication provider.
providerName | The providerName which is authentication provider. |
|
static |
Gets the profile from the authentication provider.
providerName | The providerName which is authentication provider. |
|
static |
Gets the user ID from the authentication provider.
providerName | The providerName which is authentication provider. |
|
static |
Gets the carrier code set for the current device.
|
static |
Gets the carrier name set for the current device.
|
static |
Gets the country code.
First, get the country code set in USIM,
and if there is no USIM, get the country code set in the device.
|
static |
Gets the country code currently set on the device.
|
static |
Gets the country code set in USIM.
|
static |
Gets the language code set for the current device.
|
static |
Gets the display language code set for the current device.
|
static |
Gets the language code set for the current device.
|
static |
Gets the name of the last logged-in authentication provider.
|
static |
|
static |
Gets the user ID that is currently logged in.
|
static |
This function initializes the Gamebase SDK.
If this function is not called, the Gamebase SDK function will not work.
activity | The activity which is initializing modules. |
configuration | The configurations required to run the Gamebase SDK. |
callback | Initialization result callback, returns the launching information as a result of initialization. |
Example Usage:
|
static |
Indicates if we are in debug mode.
|
static |
Check whether the Gamebase is initialized.
|
static |
Returns whether this project is sandbox mode or not.
|
static |
Returns true if the GamebaseException object is null or the error code is zero.
exception | The exception that occurred. |
|
static |
Logs the user in with the external authentication provider.
activity | The activity which is starting the login process. |
providerName | The provider name witch is authentication provider. |
callback | Login result callback, returns the authentication token as a result of login. |
Example Usage:
|
static |
Logs the user in with the external authentication provider.
activity | The activity which is starting the login process. |
providerName | The providerName which is authentication provider. |
additionalInfo | The additionalInfo which is additional information using for login. |
callback | Login result callback, returns the authentication token as a result of login. |
Example Usage:
|
static |
Logs the user in with the credential of external authentication provider.
activity | The activity which is starting the login process. |
credentialInfo | The credentialInfo which is credential of authentication provider. |
callback | Login result callback, returns the authentication token as a result of login. |
Example Usage:
|
static |
Logs the user in with last logged in authentication provider.
activity | The activity which is starting the mapping process. |
callback | Login result callback, returns the authentication token as a result of login. |
Example Usage:
|
static |
Logs out the user.
activity | The activity which is starting the mapping process. |
callback | Callbacks the result of logout. |
|
static |
The method that should be called from the Activity's or Fragment's onActivityResult method.
requestCode | The request code that's received by the Activity or Fragment. |
resultCode | The result code that's received by the Activity or Fragment. |
data | The result data that's received by the Activity or Fragment. |
Example Usage:
|
static |
Remove all observer listeners.
|
static |
Remove all server push event listeners.
|
static |
Removes external authentication that is mapped to the current user identifier.
activity | The activity which is starting the mapping process. |
providerName | The providerName which is authentication provider. |
callback | Callbacks the result of removing the mapping. |
Example Usage:
|
static |
Remove a observer listener.
observer | The callback that will be removed. |
|
static |
Remove a server push event listener.
event | The callback that will be removed. |
|
static |
Used to enable or disable logging, and other debug features.
If true, Outputs a log when the log priority is VERBOSE or higher.
If false, Outputs a log when the log priority is WARN or higher.
enableDebug | Debug features (like logging) are enabled if true, disabled if false. |
|
static |
|
static |
Withdraws the user.
activity | The activity which is starting the mapping process. |
callback | Callbacks the result of withdraw. |