반응형

안녕하세요, 

신입으로 면접을 보러 다닐때 받았던 질문들을 정리해서 올려 드리려고 합니다.

 

참고로 저는 비전공 + 국비지원교육을 통해 취업준비를 한 케이스 입니다. 추후 국비지원교육에 대한 내용도 한번 다루어 보도록 하겠습니다.

 

차량관련(Android Auto) 안드로이드 개발 기업

  • ANI가 무엇인지 알고있는지?
  • AUTOSA 들어봤는지?
  • 비전공자이고 JAVA를 처음 접했는데, 어땠는지?
    • 객체지향 언어의 특징?
  • android 실행 절차?
  • 절차지향언어가 무엇인지?
  • 내학과는 어떤 학과이고, 학과에서 무엇을 배우는지?
  • QT플랫폼 들어봤는지?
  • JVM이 무엇이고 장 단점은?
  • 메소드 오버로딩, 오버라이딩에 대한 설명?

자사 서비스 개발 및 솔루션 기업

  • 비전공자인데 프로그래밍을 선택한 특별한 이유가 있는지?
  • 메소드 오버로딩, 오버라이딩이 무엇인지?
  • 회사가 어떠한 일을 하는지 알고있는지?
  •  B2C(Business to Customer)보다는 B2B(Business to Business) 를 담당하는 회사인데 알고있는지?
    • 그렇다면 이 회사에 들어와서 어떠한 일을 하게 될거같은지?
    • 이 회사에 들어와서 어떠한 개발자로 성장 하고 싶은지?
  • Retrofit2 라이브러리에 대한 설명?

자사 서비스 개발 기업

  • list, tuple, set 차이점?
  • ANR이 무엇이고, 경험해본적이 있는지?
  • 학과에서는 어떠한 것을 배우는지?
  • 프로그래밍 관련 과목은 이수를 했는지?
  • 학점관리는 어떻게 했는지?
  • 포트폴리오에 기재된 프로젝트중에 가장 의미있는 프로젝트가 무엇인지?
  • 영상처리관련 기술 관심이 있는지?
  • 안드로이드 라이프사이클 설명
  • 안드로이드 4대 컴포넌트?
    • service와 content provider를 사용해서 프로젝트를 진행한 것이 있는지?
  • 서버와의 통신은 무엇을 통해 구현을 하였는지?
    • 다른 라이브러리도 있지만, Retrofit2을 사용한 이유가 있는지?

 

TIP

기본적인 java, android 질문 외에  대부분 '비전공자'에 초점을 두어 학과에 대한 설명을 요구하였고, 왜 프로그래밍을 하게 되었는지에 대한 질문이 주를 이루었던 것 같습니다.

 

저는 학과와 프로그래밍을 접목시킬 수 있는 방향으로 설명을 하였고, 학과에서 했던 경험들을 풀어서 말씀 드렸습니다.

 

면접보러 가시는 기업이 현재 서비스 하고 있는 앱이 있다면, 면접 보러가기전에 설치해서 조금 봐두시는 것도 추천드립니다. 만약 어플 후기의 평점이 낮다면 그 이유에 대해서도 한번쯤 생각 해보시면 좋을 것 같습니다.

 

마지막으로 회사에 궁금한점, 할 말?

마지막으로 회사에 대해 궁금한 점이나 할말이 있냐는 질문을 받았을 경우 정말 궁금하신 부분을 물어보시면 될 것 같습니다. 만약 정말 물어볼 것이 없다면 다음 질문을 여쭤보시는것도 추천 드립니다.

 

 - 회사에 입사하게 되면, 실제로 하게 되는 일이 어떤 것인지?

 - 안드로이드 개발을 담당하는 인원은 몇 명이 있는지?

 - 중간급 관리자(사수) 가 있는지?

 

회사가 원하는 사람을 채용하는 것도 맞지만, 내가 회사에 입사하여 적응하고 배울점이 있는지도 중요하기 때문입니다. 

 

실제 규모는 조금 있다고 하더라도, 팀단위로 나뉘게 되면 실제 개발업무를 담당하는 인원이 적을수도 있습니다. 중간급 관리자가 없는 경우도 신입의 입장에서는 부담스럽기 때문에 궁금하신 부분은 면접때 여쭤보시면 좋을 것 같습니다. 

 

입사 후 면접을 보셨던 사수님께 들은 후기?

- 신입으로 채용을 하는 경우, 큰 기대를 하지않는다고 하셨습니다. 실제 입사 후에 같이 일을 해야하는 사람을 채용하는 과정이다보니 태도와 자세, 의지를 크게 본다고 하세요. 그 외에  자소서 및 포트폴리오에 기재한 내용은 반드시 숙지하고, 질문에 대한 대답이 떠오르지않아도 솔직하게 말씀드리고 설명에 대한 경청하는 자세를 보이시면 될 것 같습니다. 

반응형
반응형

swipe refresh

데이터를 받아오는 작업을 하거나, 새로고침이 필요한 경우 해당 라이브러리를 사용하여 간단한게 구현할 수 있습니다.


build.gradle

// swipe refresh
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"

 

xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/swiperefreshlayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".User.UserActivity">
    
    // 내용
    
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

새로고침을 구현할 부분을 SwipeRefreshLayout으로 감싸 줍니다.

Activity

SwipeRefreshLayout swipeRefreshLayout;

...

        // 새로고침
        swipeRefreshLayout = findViewById(R.id.swiperefreshlayout);

        swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
            
            // 새로고침 할 부분

                swipeRefreshLayout.setRefreshing(false);
            }
        });

setOnRefreshListener를 호출하여 onRefresh() 부분에 새로고침 할 부분에 대한 코드를 입력하시면 됩니다.

 

가령 어떤 리스트 값을 받아온다고 할때, Retrofit라이브러리의 Get요청을 통해 서버의 데이터를 조회합니다.

Get요청에 대한 코드를 '새로고침 할 부분'에 넣어주시고 화면을 위에서 아래로 쓸어내리면, 해당 동작을 할 때마다 Get요청을 하게 됩니다. 

반응형
반응형

lottie

lottie 애니메이션은 카테고리 옆 이미지, 로딩 다이얼로그 등  화면을 보다 동적으로 보여주기에 목적에 따라 다양하게 활용 될 수 있습니다.

build.gradle

// lottie
    implementation 'com.airbnb.android:lottie:5.0.2'

raw 파일 생성

res 우클릭 - New - Android Resource Directory

Android Resource Deirectory
raw파일 생성


lottie 홈페이지

https://lottiefiles.com/

 

LottieFiles: Download Free lightweight animations for website & apps.

Effortlessly bring the smallest, free, ready-to-use motion graphics for the web, app, social, and designs. Create, edit, test, collaborate, and ship Lottie animations in no time!

lottiefiles.com

원하는 이미지의 JSON파일을 선택해 줍니다.

 

JSON 파일 다운로드

 

다운로드한 파일을 raw에 추가

car.json


xml

<com.airbnb.lottie.LottieAnimationView
    android:layout_width="150dp"
    android:layout_height="150dp"
    android:layout_gravity="center"
    app:lottie_rawRes="@raw/car"
    app:lottie_autoPlay="true"
    app:lottie_loop="true" />

app:lottie_rawRes="@raw/car" 원하는 lottie json파일을 연결 시켜 줍니다.


결과

lottie 애니메이션

반응형
반응형

Retrofit2 라이브러리를 사용하여 서버와 데이터를 주고 받는 작업을 진행하겠습니다.

Retrofit2

Retrofit2 은 서버와의 RestAPI 통신을 가능하게 도와주는 라이브러리 입니다. 

 retrofit 외에 통신을 가능하게 하는 라이브러리가 있지만, 속도 뿐만 아니라 많은 장점을 보유하고 있기에 Retrofit을 많이 선호 한다고 합니다.


build.gradle

// retrofit2
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
// Gson 변환기
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

retrofit, gson 라이브러리를 추가해 줍니다.

 

ApiClient.java 클래스 생성

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class ApiClient {

    private static final String BASE_URL = "http://IPv4주소:서버포트/";
    // "http://192.168.xxx.xxx:80/"

    public static RetrofitAPI getApiService(){
        return getInstance().create(RetrofitAPI.class);
    }

    private static Retrofit getInstance(){
        Gson gson = new GsonBuilder().setLenient().create();
        return new Retrofit.Builder()
                .baseUrl(BASE_URL)
                .addConverterFactory(GsonConverterFactory.create(gson))
                .build();
    }
}

 


다음은 BASE_URL 부분에 입력할 IPv4 주소와 서버포트를 확인하는 방법 입니다.

IPv4 주소 확인

cmd - ipconfig 입력

 

IPv4 주소

 

서버포트 확인

sts4 실행 -> src/main/resources -> application.properties

 

서버 포트


RetrofitAPI.java 인터페이스 생성

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;

public interface RetrofitAPI {

    @GET("api/sample")
    Call<List<Data>> getPost();

    @POST("api/communitytest")
    Call<String> createPost(@Body Data data);

    @PUT("api/communitytest/{textid}")
    Call<String> putPost(@Path("textid") String id, @Body Data data);

    @DELETE("api/communitytest/{textid}")
    Call<String> deletePost(@Path("textid") String id);
}

@GET/POST/PUT/DELETE ("서버 controller에서 처리한 url 주소")

 

서버 controller

 

 

GET 요청 예시

브라우저에서 http://192.168.xxx.xxx:80/api/sample 을 검색하게 되면 미리 입력한 데이터를 확인 할 수 있습니다.

 

GET요청


Data.java 클래스 생성

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class Data {

    public Data(String id, String title, String name, String major, String time, String boarding, String destination, String content) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.name = name;
        this.major = major;
        this.time = time;
        this.boarding = boarding;
        this.destination = destination;
    }

    @SerializedName("id")
    @Expose
    private String id;

    @SerializedName("title")
    @Expose
    private String title;

    @SerializedName("content")
    @Expose
    private String content;

    @SerializedName("name")
    @Expose
    private String name;

    @SerializedName("major")
    @Expose
    private String major;

    @SerializedName("time")
    @Expose
    private String time;

    @SerializedName("boarding")
    @Expose
    private String boarding;

    @SerializedName("destination")
    @Expose
    private String destination;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getBoarding() {
        return boarding;
    }

    public void setBoarding(String boarding) {
        this.boarding = boarding;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    @Override
    public String toString() {
        return "Data{" +
                "id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", name='" + name + '\'' +
                ", major='" + major + '\'' +
                ", time='" + time + '\'' +
                ", boarding='" + boarding + '\'' +
                ", destination='" + destination + '\'' +
                '}';
    }
}

생성자, Getter, Setter, toString(Log 확인용) 를 추가 해줍니다.

  • 생성자 추가 후 빈공간 우클릭 - Generate - Getter and Setter
  • 해당 생성자는 서버의 VO와 일치하게 작성.

서버 VO 파일


Activity

List<Data> dataList;

...

// Get
        Call<List<Data>> call = ApiClient.getApiService().getPost();
        call.enqueue(new Callback<List<Data>>() {
            @Override
            public void onResponse(Call<List<Data>> call, Response<List<Data>> response) {
            	// 서버와의 통신이 성공했을 때 처리하는 부분
                dataList = response.body(); // 서버에서 return값으로 넘겨주는 값
                Log.i("sample", response.body()+""); // 로그 확인 시 입력된 값을 받아오는것을 확인

            }

            @Override
            public void onFailure(Call<List<Data>> call, Throwable t) {
            	// 서버와의 통신이 실패했을 때 처리하는 부분 
                Log.i("sample", "GET 실패"+t.getMessage());

            }
        });

주의사항

  • 테스트하는 서버와 모바일 핸드폰의 와이파이를 동일하게 설정 해주어야 통신이 가능합니다.
  • localhost 대신 IPv4 주소를 입력해 주어야 합니다.

 

새로고침

https://a070415.tistory.com/entry/Android-%EC%83%88%EB%A1%9C%EA%B3%A0%EC%B9%A8-%EA%B5%AC%ED%98%84-swipe-refresh

 

[Android] 새로고침 구현 - swipe refresh

swipe refresh 데이터를 받아오는 작업을 하거나, 새로고침이 필요한 경우 해당 라이브러리를 사용하여 간단한게 구현할 수 있습니다. build.gradle // swipe refresh implementation "androidx.swiperefreshlayout:swiperef

junn97.com

 

반응형

+ Recent posts