Skip to content

SUDRTGameUserManager ​

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

global.sud.op.runtime.core.SUDRTGameUserManager

Methods ​

MethodDescription
setGameInfo(userId, gameId, info)Write information for a user/game pair and return boolean; see the constants below for info keys.
getGameInfo(userId, gameId)Query information for a user/game pair as a Bundle.
removeGame(userId, gameId, listener)Request removal of a user game and receive onSuccess/onFailure.
removeGameInfo(userId, gameId)Remove information for a user/game pair and return boolean.
cancelRemoveGameRequest()Cancel user-game removal requests.
listGameInfo()Return an array of game-information Bundles.
getGameDataPaths(userId, gameId)Return a Bundle of user-game paths using KEY_USER_GAME_DATA_PATH, KEY_USER_GAME_TEMP_PATH, and KEY_USER_GAME_LOCAL_STORAGE_PATH.

Declarations, option keys, and callbacks ​

java
public interface SUDRTGameUserManager {
    int KEY_USER_GAME_AUTH_GRANTED = 1;
    int KEY_USER_GAME_AUTH_DENIED = 2;
    String KEY_USER_ID = "rt_user_id";
    String KEY_USER_GAME_ID = "rt_user_game_id";
    String KEY_USER_GAME_RESERVE = "rt_user_game_reserve";
    String KEY_USER_GAME_EXTRA_INFO = "rt_user_game_extra_info";
    String KEY_USER_GAME_LAST_PLAY_TIME = "rt_user_game_last_play_time";
    String KEY_USER_GAME_PLAYED = "rt_user_game_played";
    String KEY_USER_GAME_REMOVED = "rt_user_game_removed";
    String KEY_PERMISSION_CAMERA = "scope.camera";
    String KEY_PERMISSION_LOCATION = "scope.userLocation";
    String KEY_PERMISSION_RECORD = "scope.record";
    String KEY_PERMISSION_SAVE_TO_ALBUM = "scope.writePhotosAlbum";
    
    @Deprecated
    String KEY_PERMISSION_USER_INFO = "scope.userInfo";
    String KEY_USER_GAME_DATA_PATH = "rt_user_game_data_path";
    String KEY_USER_GAME_TEMP_PATH = "rt_user_game_temp_path";
    String KEY_USER_GAME_LOCAL_STORAGE_PATH = "rt_user_game_local_storage_path";

    boolean setGameInfo(@NonNull String userId, @NonNull String gameId, @NonNull Bundle info);

    Bundle getGameInfo(@NonNull String userId, @NonNull String gameId);

    void removeGame(@NonNull String userId, @NonNull String gameId, @NonNull UserRemoveGameListener listener);

    boolean removeGameInfo(@NonNull String userId, @NonNull String gameId);

    void cancelRemoveGameRequest();

    Bundle[] listGameInfo();

    Bundle getGameDataPaths(@NonNull String userId, @NonNull String gameId);

    public interface UserRemoveGameListener {
        void onFailure(Throwable var1);

        void onSuccess();
    }
}