Gamebase SDK for Android  2.44.0
NHN Cloud Gamebase Platform
UpdateInfo Class Reference

If the Initialize API fails with error LAUNCHING_UNREGISTERED_CLIENT (2004),
this VO class tells you why. More...

Inheritance diagram for UpdateInfo:
Inheritance graph
Collaboration diagram for UpdateInfo:
Collaboration graph

Public Member Functions

String toJsonString ()
 
String toPrettyJsonString ()
 
String toString ()
 

Static Public Member Functions

static UpdateInfo from (GamebaseException exception)
 Factory method to create VO instance. More...
 
static UpdateInfo from (final String message, final String installUrl, final String detailUrl)
 
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)
 

Public Attributes

String installUrl
 Market url to update the application. More...
 
String message
 This message indicates to the user that an update is needed. More...
 
String detailUrl
 This url is displayed in the web view when the 'Show Details' button is clicked. More...
 

Detailed Description

If the Initialize API fails with error LAUNCHING_UNREGISTERED_CLIENT (2004),
this VO class tells you why.

Since
Added 2.7.2

Example Usage:

void initializationSample() {
Gamebase.initialize(activity, configuration, new GamebaseDataCallback<LaunchingInfo>() {
@Override
public void onCallback(final LaunchingInfo data, GamebaseException exception) {
if (Gamebase.isSuccess(exception)) {
// Gamebase initialization succeeded.
} else {
// Gamebase initialization failed.
UpdateInfo updateInfo = UpdateInfo.from(exception);
if (updateInfo != null) {
// Unregistered game client version.
// Open market url to update application.
updateInfo.installUrl; // Market URL.
updateInfo.message; // Message from launching server.
return;
}
// Another initialization error.
...
}
...
}
});
}
See also
com.toast.android.gamebase.Gamebase#initialize(Activity, GamebaseConfiguration, GamebaseDataCallback)
com.toast.android.gamebase.base.GamebaseException

Member Function Documentation

◆ from() [1/2]

static UpdateInfo from ( final String  message,
final String  installUrl,
final String  detailUrl 
)
static

◆ from() [2/2]

static UpdateInfo from ( GamebaseException  exception)
static

Factory method to create VO instance.

Parameters
exceptionExtracts the VO class instance from this exception.
Returns
VO instance
Here is the call graph for this function:

◆ fromJson() [1/3]

static <T> T fromJson ( @NonNull JSONObject  jsonObject,
Class< T >  classOfT 
)
staticinherited
Here is the call graph for this function:

◆ fromJson() [2/3]

static <T> T fromJson ( @NonNull String  json,
Class< T >  classOfT 
)
staticinherited
Here is the caller graph for this function:

◆ fromJson() [3/3]

static <T> T fromJson ( @NonNull String  json,
Type  type 
)
staticinherited

◆ toJsonString()

String toJsonString ( )
inherited
Here is the caller graph for this function:

◆ toPrettyJsonString()

String toPrettyJsonString ( )
inherited

◆ toString()

String toString ( )
inherited

Reimplemented in TransferAccountRenewConfiguration.

Here is the call graph for this function:

Member Data Documentation

◆ detailUrl

String detailUrl

This url is displayed in the web view when the 'Show Details' button is clicked.

◆ installUrl

String installUrl

Market url to update the application.

◆ message

String message

This message indicates to the user that an update is needed.