Skip to content

SUDRTGamePackageManager ​

The full interface declaration below includes parameter keys and callbacks. Obtain an instance through getManager.

global.sud.op.runtime.core.SUDRTGamePackageManager

Methods ​

MethodDescription
installPackage(packagePath, gameId, gameSignatureJson, listener)Install a local game package. SUDV2 requires game-signature JSON containing globalKeyHex and publicKeyHash; other formats may pass null. Unsupported formats fail through the listener.
installSubPackage(packagePath, gameId, name, root, gameSignatureJson, listener)Install a subpackage into the main package. name and root match manifest.json SubPackages; signature requirements match the main package.
removePackage(gameId, listener)Remove a game package and receive the result through the listener.
listPackage(listener)Receive package entries through onListSuccess(Bundle[]).
cancelPackageRequest()Cancel package management requests.
getPackagePath(gameId)Query the installed game package path.
getGameConfig(gameId, globalKeyHex)Read SUDRTGameConfig by game ID.
getGameConfigByPackagePath(packagePath, globalKeyHex)Read SUDRTGameConfig by package path.

Declarations, option keys, and callbacks ​

java
public interface SUDRTGamePackageManager {
    String KEY_PACKAGE_GAME_ID = "rt_package_game_id";
    String KEY_PACKAGE_CONTENT_PATH = "rt_package_content_path";

    void installPackage(@NonNull String packagePath, @NonNull String gameId, String gameSignatureJson, @NonNull PackageInstallListener listener);

    void installSubPackage(@NonNull String packagePath, @NonNull String gameId, @NonNull String name,
                           @NonNull String root, String gameSignatureJson, @NonNull PackageInstallListener listener);

    void removePackage(@NonNull String gameId, @NonNull PackageRemoveListener listener);

    void listPackage(@NonNull PackageListListener listener);

    void cancelPackageRequest();

    String getPackagePath(@NonNull String gameId);

    SUDRTGameConfig getGameConfig(@NonNull String gameId, @NonNull String globalKeyHex);

    SUDRTGameConfig getGameConfigByPackagePath(@NonNull String packagePath, @NonNull String globalKeyHex);

    public interface PackageInstallListener {
        void onInstallStart();

        void onInstallProgress(float var1);

        void onInstallSuccess();

        void onInstallFailure(Throwable var1);
    }

    public interface PackageListListener {
        void onListSuccess(Bundle[] var1);

        void onListFailure(Throwable var1);
    }

    public interface PackageRemoveListener {
        void onRemoveSuccess();

        void onRemoveFailure(Throwable var1);
    }
}

See SUDRTGameConfig for the returned configuration type. Use signatures and keys only for API processing; do not log them.