Search in sources :

Example 1 with EmptyRoomListener

use of com.herewhite.demo.utils.EmptyRoomListener in project whiteboard-android by netless-io.

the class CameraMoveActivity method joinRoom.

private void joinRoom() {
    WhiteSdkConfiguration configuration = new WhiteSdkConfiguration(demoAPI.getAppId(), true);
    whiteSdk = new WhiteSdk(whiteboardView, this, configuration);
    RoomParams roomParams = new RoomParams(demoAPI.getRoomUUID(), demoAPI.getRoomToken(), DemoAPI.DEFAULT_UID);
    whiteSdk.joinRoom(roomParams, new EmptyRoomListener(), new Promise<Room>() {

        @Override
        public void then(Room room) {
            CameraMoveActivity.this.room = room;
            loadImageInfo("https://placekitten.com/1920/1080");
        }

        @Override
        public void catchEx(SDKError t) {
            showToast(t.getMessage());
        }
    });
}
Also used : WhiteSdkConfiguration(com.herewhite.sdk.WhiteSdkConfiguration) SDKError(com.herewhite.sdk.domain.SDKError) RoomParams(com.herewhite.sdk.RoomParams) WhiteSdk(com.herewhite.sdk.WhiteSdk) Room(com.herewhite.sdk.Room) EmptyRoomListener(com.herewhite.demo.utils.EmptyRoomListener)

Example 2 with EmptyRoomListener

use of com.herewhite.demo.utils.EmptyRoomListener in project whiteboard-android by netless-io.

the class CameraMoveImageActivity method joinRoom.

private void joinRoom() {
    WhiteSdkConfiguration configuration = new WhiteSdkConfiguration(demoAPI.getAppId(), true);
    whiteSdk = new WhiteSdk(whiteboardView, this, configuration);
    RoomParams roomParams = new RoomParams(demoAPI.getRoomUUID(), demoAPI.getRoomToken(), DemoAPI.DEFAULT_UID);
    whiteSdk.joinRoom(roomParams, new EmptyRoomListener(), new Promise<Room>() {

        @Override
        public void then(Room room) {
            CameraMoveImageActivity.this.room = room;
            loadImageInfo(TEST_IMAGE_URL);
        }

        @Override
        public void catchEx(SDKError t) {
            showToast(t.getMessage());
        }
    });
}
Also used : WhiteSdkConfiguration(com.herewhite.sdk.WhiteSdkConfiguration) SDKError(com.herewhite.sdk.domain.SDKError) RoomParams(com.herewhite.sdk.RoomParams) WhiteSdk(com.herewhite.sdk.WhiteSdk) Room(com.herewhite.sdk.Room) EmptyRoomListener(com.herewhite.demo.utils.EmptyRoomListener)

Aggregations

EmptyRoomListener (com.herewhite.demo.utils.EmptyRoomListener)2 Room (com.herewhite.sdk.Room)2 RoomParams (com.herewhite.sdk.RoomParams)2 WhiteSdk (com.herewhite.sdk.WhiteSdk)2 WhiteSdkConfiguration (com.herewhite.sdk.WhiteSdkConfiguration)2 SDKError (com.herewhite.sdk.domain.SDKError)2