| | package org.ntlab.irisclient.viewmodels; |
---|
| | |
---|
| | import android.os.Debug; |
---|
| | |
---|
| | |
---|
| | import org.ntlab.irisclient.models.DrawingState; |
---|
| | import org.ntlab.irisclient.resources.DrawingRest; |
---|
| | import org.ntlab.irisclient.resources.RoomsRest; |
---|
| |
---|
| | import androidx.lifecycle.MutableLiveData; |
---|
| | import androidx.lifecycle.ViewModel; |
---|
| | |
---|
| | import java.util.List; |
---|
| | import java.util.Timer; |
---|
| | |
---|
| | import retrofit2.Retrofit; |
---|
| | import retrofit2.Call; |
---|
| | import retrofit2.Callback; |
---|
| | import retrofit2.Response; |
---|
| | import retrofit2.converter.jackson.JacksonConverterFactory; |
---|
| | |
---|
| | public class DrawingStateViewModel extends ViewModel { |
---|
| | public class DrawingStateViewModel extends TimerViewModel { |
---|
| | |
---|
| | final private MutableLiveData<Integer> stateMutableLiveData=new MutableLiveData<>(); |
---|
| | final private MutableLiveData<Integer> dnoMutableLiveData=new MutableLiveData<>(); |
---|
| | final private Retrofit retrofit; |
---|
| |
---|
| | //ゲッター |
---|
| | public LiveData<Integer> getDrawingStateLiveData(){ |
---|
| | return this.stateMutableLiveData; |
---|
| | } |
---|
| | |
---|
| | public void run(){test();} |
---|
| | |
---|
| | |
---|
| | private void test(){ |
---|
| | System.out.print("タイマーのデバッグ"); |
---|
| | } |
---|
| | |
---|
| | |
---|
| | public void updateState(String rid) { |
---|
| | |
---|
| | final RoomsRest roomsRest = retrofit.create(RoomsRest.class); |
---|
| |
---|
| | |