diff --git a/app/src/main/java/com/example/nemophila/LoginActivity.java b/app/src/main/java/com/example/nemophila/LoginActivity.java index e08d474..25dba64 100644 --- a/app/src/main/java/com/example/nemophila/LoginActivity.java +++ b/app/src/main/java/com/example/nemophila/LoginActivity.java @@ -1,14 +1,29 @@ package com.example.nemophila; import androidx.appcompat.app.AppCompatActivity; +import androidx.constraintlayout.widget.ConstraintSet; import android.os.Bundle; +import com.example.nemophila.resources.AccountsRest; + +import retrofit2.Retrofit; +import retrofit2.converter.jackson.JacksonConverterFactory; + public class LoginActivity extends AppCompatActivity { + private Retrofit retrofit; + private AccountsRest AccountsRest; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); + //通信の初期化 + this.retrofit = new Retrofit.Builder() + .baseUrl("http://nitta-lab-www.is.konan-u.ac.jp/nemophila/") + .addConverterFactory(JacksonConverterFactory.create()) + .build(); + this.AccountsRest = retrofit.create(AccountsRest.class); } } \ No newline at end of file