Newer
Older
NemophilaClient / app / src / main / java / com / example / nemophila / LoginActivity.java
k-kimoto on 1 Jun 2023 919 bytes 通信の初期化
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);
    }
}