BanInfo

open class BanInfo : ValueObject

If the login or addMapping API fails with error BANNED_MEMBER (7), this VO class tells you the ban information.

Example Usage:

void onLoginWithBannedMember() {
    Gamebase.login(activity, provider, new GamebaseDataCallback<AuthToken>() {
        @Override
        public void onCallback(AuthToken data, GamebaseException exception) {
            if (!Gamebase.isSuccess(exception)) {
                BanInfo banInfo = BanInfo.from(exception);
                if (banInfo != null) {
                    // Login failed because the user is banned.
                    // Show the user the reason for the block and the block period.
                    return;
                }
                // Login failed by another reason.
                return;
            }
            // Login Success.
        }
    });
}

Since

Added 1.11.0.

See also

Properties

Link copied to clipboard
open var banType: String
There are two types of the banning.
Link copied to clipboard
open var beginDate: Long
Time when banning was started.
Link copied to clipboard
open var csInfo: String
The URL of the customer center web page.
Link copied to clipboard
open var csUrl: String
The email address of the customer center.
Link copied to clipboard
open var endDate: Long
Time when banning will be released.
Link copied to clipboard
open var message: String
Banning message entered from the Gamebase console.
Link copied to clipboard
open var userId: String
User ID who was banned.

Functions

Link copied to clipboard
open fun from(exception: GamebaseException): BanInfo
Factory method to create VO instance.
Link copied to clipboard
open fun <T> fromJson(@NonNull json: String, classOfT: Class<T>): T
open fun <T> fromJson(@NonNull json: String, type: Type): T
open fun <T> fromJson(@NonNull jsonObject: JSONObject, classOfT: Class<T>): T
Link copied to clipboard
open fun toJsonString(): String
Link copied to clipboard
Link copied to clipboard
open fun toString(): String