UpdateInfo

open class UpdateInfo : ValueObject

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

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.
                 }
             }
         });
     }

Since

Added 2.7.2

See also

Properties

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

Functions

Link copied to clipboard
open fun from(exception: GamebaseException): UpdateInfo
Factory method to create VO instance.
open fun from(message: String, installUrl: String, detailUrl: String): UpdateInfo
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