diff --git a/app/src/main/java/org/ntlab/irisclient/viewmodels/DrawingStateViewModel.java b/app/src/main/java/org/ntlab/irisclient/viewmodels/DrawingStateViewModel.java index 137efe5..eb2f7af 100644 --- a/app/src/main/java/org/ntlab/irisclient/viewmodels/DrawingStateViewModel.java +++ b/app/src/main/java/org/ntlab/irisclient/viewmodels/DrawingStateViewModel.java @@ -10,6 +10,9 @@ import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.List; import java.util.Timer; @@ -117,7 +120,10 @@ updateState(rid); updateDno(rid, nickName); } - public void putDrawing(){ - + public String putDrawing(){ + String source = "サンプル"; + Charset charset = StandardCharsets.UTF_8; + String result = Base64.getEncoder().encodeToString(source.getBytes(charset)); + return result; } }