diff --git a/app/src/main/java/org/ntlab/irisclient/viewmodels/RoomViewModel.java b/app/src/main/java/org/ntlab/irisclient/viewmodels/RoomViewModel.java index ba4c58b..6f6458f 100644 --- a/app/src/main/java/org/ntlab/irisclient/viewmodels/RoomViewModel.java +++ b/app/src/main/java/org/ntlab/irisclient/viewmodels/RoomViewModel.java @@ -62,7 +62,7 @@ //----------------------------------------------------------------------------- //各Activityでのボタン処理 //チーム&マスター変更 - public void changeTeamAndMaster(String rid,String nickname,String belongs,Boolean isMaster) { + public void changeBelongsAndMaster(String rid,String nickname,String belongs,Boolean isMaster) { final RoomsRest roomsRest = retrofit.create(RoomsRest.class); Call call = roomsRest.putMember(rid,nickname,belongs,isMaster); @@ -70,14 +70,32 @@ @Override public void onResponse(Call call, Response response) { if (response.isSuccessful()){ - //サーバーで返り値変更しておく(String→void) - //return 変更しましたの返り値がどう、とかいうエラー起きる + System.out.println("通信成功:changeBelongsAndMaster"); } } @Override public void onFailure(Call call, Throwable t) { - //System.out.println("通信失敗"); - //System.out.println(t); + System.out.println("通信失敗:changeBelongsAndMaster"); + System.out.println(t); + } + }); + } + + public void startDrawing(String rid,String nickname) { + final RoomsRest roomsRest = retrofit.create(RoomsRest.class); + Call call = roomsRest.putState(rid,nickname,2); + + call.enqueue(new Callback() { + @Override + public void onResponse(Call call, Response response) { + if (response.isSuccessful()){ + System.out.println("通信成功:startDrawing"); + } + } + @Override + public void onFailure(Call call, Throwable t) { + System.out.println("通信失敗:startDrawing"); + System.out.println(t); } }); }