Skip to content

loadPackage ​

Load a game package using the supplied parameters and receive results and stage progress through SUDRTFSMGame.

Declaration ​

java
SUDRTFSTAPP loadPackage(SUDRTLoadGameParams model, SUDRTFSMGame fsmGame);

SUDRTLoadGameParams ​

global.sud.op.runtime.core.model.SUDRTLoadGameParams

FieldTypeDescription
contextContextRequired loading context
userIdStringRequired nonempty user ID
gameIdStringRequired nonempty game ID
versionStringGame package version
pathStringPath or URL matching pathType
pathTypeSUDOPGamePathTypeFILE, DIR, URL, SIGNATURE, or GAME_ID
gameSignatureStringGame signature

SUDRTFSMGame ​

java
public interface SUDRTFSMGame {

    void onSuccess(SUDOPGameInfo gameInfo, GameMetaInfo gameMetaInfo);

    void onFailure(int retCode, String retMsg);

    void onGameLoadingProgress(int stage, int retCode, int progress);

    void onPkgDownloaded();

    void onPkgInstalled();

}

Progress stage: 1 = start, 2 = loading, 3 = end. retCode 0 indicates success; progress ranges from 0 to 100. onPkgDownloaded and onPkgInstalled report completion of downloading and installation.

SUDOPGameInfo is in global.sud.op.runtime.core.model; GameMetaInfo is in global.sud.op.runtime.hub.model.

Return value ​

SUDRTFSTAPP is a loading-operation handle. Its current interface exposes no methods and provides no run, stop, or cancel operation. To start a game from the app, use startGame.