diff --git a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java index ab843e0..7757e5e 100644 --- a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java +++ b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java @@ -1,6 +1,7 @@ package org.ntlab.radishforandroidstudio.cactusClient.views; +import android.accounts.Account; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; @@ -15,6 +16,7 @@ import net.arnx.jsonic.JSON; import org.ntlab.radishforandroidstudio.R; +import org.ntlab.radishforandroidstudio.cactusClient.Cactus; import org.ntlab.radishforandroidstudio.cactusClient.connections.LoginFragmentConnection; import org.ntlab.radishforandroidstudio.cactusClient.views.InstancesFragment; import org.ntlab.radishforandroidstudio.cactusClient.models.URIAddressedEntity; @@ -76,8 +78,14 @@ URIAddressedEntity lac = JSON.decode(response, URIAddressedEntity.class); System.out.println("///////////////////////////////////////////////"); + + + + System.out.println(response); + //Cactus.setMyAccount((Account)lac.getBody()); + if(response.contains("\"login\":true,")){ Toast.makeText(getActivity(),"ログインに成功しました。", Toast.LENGTH_SHORT).show();