Search in sources :

Example 11 with WhiteSdkConfiguration

use of com.herewhite.sdk.WhiteSdkConfiguration 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 12 with WhiteSdkConfiguration

use of com.herewhite.sdk.WhiteSdkConfiguration 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

WhiteSdk (com.herewhite.sdk.WhiteSdk)12 WhiteSdkConfiguration (com.herewhite.sdk.WhiteSdkConfiguration)12 SDKError (com.herewhite.sdk.domain.SDKError)12 Room (com.herewhite.sdk.Room)10 RoomParams (com.herewhite.sdk.RoomParams)10 RoomPhase (com.herewhite.sdk.domain.RoomPhase)7 RoomState (com.herewhite.sdk.domain.RoomState)7 JSONObject (org.json.JSONObject)7 AbstractRoomCallbacks (com.herewhite.sdk.AbstractRoomCallbacks)5 CommonCallback (com.herewhite.sdk.CommonCallback)5 RoomCallbacks (com.herewhite.sdk.RoomCallbacks)4 Date (java.util.Date)4 ConvertException (com.herewhite.sdk.domain.ConvertException)3 FontFace (com.herewhite.sdk.domain.FontFace)3 WindowParams (com.herewhite.sdk.domain.WindowParams)3 HashMap (java.util.HashMap)3 EmptyRoomListener (com.herewhite.demo.utils.EmptyRoomListener)2 CommonCallbacks (com.herewhite.sdk.CommonCallbacks)2 Player (com.herewhite.sdk.Player)2 RoomListener (com.herewhite.sdk.RoomListener)2