If the login or addMapping API fails with error BANNED_MEMBER (7),
this VO class tells you the ban information.
More...
|
static BanInfo | from (GamebaseException exception) |
| Factory method to create VO instance. More...
|
|
static< T > T | fromJson (@NonNull String json, Class< T > classOfT) |
|
static< T > T | fromJson (@NonNull JSONObject jsonObject, Class< T > classOfT) |
|
static< T > T | fromJson (@NonNull String json, Type type) |
|
If the login or addMapping API fails with error BANNED_MEMBER (7),
this VO class tells you the ban information.
- Since
- Added 1.11.0.
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) {
return;
}
...
return;
}
}
});
}
- See also
- com.toast.android.gamebase.Gamebase#loginForLastLoggedInProvider(Activity, GamebaseDataCallback)
-
com.toast.android.gamebase.Gamebase#login(Activity, String, GamebaseDataCallback)
-
com.toast.android.gamebase.Gamebase#login(Activity, String, Map, GamebaseDataCallback)
-
com.toast.android.gamebase.Gamebase#login(Activity, Map, GamebaseDataCallback)
-
com.toast.android.gamebase.Gamebase#addMapping(Activity, String, GamebaseDataCallback)
-
com.toast.android.gamebase.Gamebase#addMapping(Activity, String, Map, GamebaseDataCallback)
-
com.toast.android.gamebase.Gamebase#addMapping(Activity, Map, GamebaseDataCallback)
-
com.toast.android.gamebase.base.GamebaseException
◆ from()
Factory method to create VO instance.
- Parameters
-
exception | Extracts the VO class instance from this exception. |
- Returns
- VO instance
◆ fromJson() [1/3]
static <T> T fromJson |
( |
@NonNull JSONObject |
jsonObject, |
|
|
Class< T > |
classOfT |
|
) |
| |
|
staticinherited |
◆ fromJson() [2/3]
static <T> T fromJson |
( |
@NonNull String |
json, |
|
|
Class< T > |
classOfT |
|
) |
| |
|
staticinherited |
◆ fromJson() [3/3]
static <T> T fromJson |
( |
@NonNull String |
json, |
|
|
Type |
type |
|
) |
| |
|
staticinherited |
◆ toJsonString()
◆ toPrettyJsonString()
String toPrettyJsonString |
( |
| ) |
|
|
inherited |
◆ toString()
◆ banType
There are two types of the banning.
"TEMPORARY", "PERMANENT".
◆ beginDate
Time when banning was started.
◆ csInfo
The URL of the customer center web page.
◆ csUrl
The email address of the customer center.
◆ endDate
Time when banning will be released.
◆ message
Banning message entered from the Gamebase console.
◆ userId