- 안드로이드 9.0 파이에서는 https를 사용 하며, 주소가 http인 경우 오류가 발생.
- Android Manifest 파일에서 usesCleartextTraffic을 true로 설정
android:usesCleartextTraffic="true"
android:usesCleartextTraffic="true"
안녕하세요,
신입으로 면접을 보러 다닐때 받았던 질문들을 정리해서 올려 드리려고 합니다.
참고로 저는 비전공 + 국비지원교육을 통해 취업준비를 한 케이스 입니다. 추후 국비지원교육에 대한 내용도 한번 다루어 보도록 하겠습니다.
기본적인 java, android 질문 외에 대부분 '비전공자'에 초점을 두어 학과에 대한 설명을 요구하였고, 왜 프로그래밍을 하게 되었는지에 대한 질문이 주를 이루었던 것 같습니다.
저는 학과와 프로그래밍을 접목시킬 수 있는 방향으로 설명을 하였고, 학과에서 했던 경험들을 풀어서 말씀 드렸습니다.
면접보러 가시는 기업이 현재 서비스 하고 있는 앱이 있다면, 면접 보러가기전에 설치해서 조금 봐두시는 것도 추천드립니다. 만약 어플 후기의 평점이 낮다면 그 이유에 대해서도 한번쯤 생각 해보시면 좋을 것 같습니다.
마지막으로 회사에 대해 궁금한 점이나 할말이 있냐는 질문을 받았을 경우 정말 궁금하신 부분을 물어보시면 될 것 같습니다. 만약 정말 물어볼 것이 없다면 다음 질문을 여쭤보시는것도 추천 드립니다.
- 회사에 입사하게 되면, 실제로 하게 되는 일이 어떤 것인지?
- 안드로이드 개발을 담당하는 인원은 몇 명이 있는지?
- 중간급 관리자(사수) 가 있는지?
회사가 원하는 사람을 채용하는 것도 맞지만, 내가 회사에 입사하여 적응하고 배울점이 있는지도 중요하기 때문입니다.
실제 규모는 조금 있다고 하더라도, 팀단위로 나뉘게 되면 실제 개발업무를 담당하는 인원이 적을수도 있습니다. 중간급 관리자가 없는 경우도 신입의 입장에서는 부담스럽기 때문에 궁금하신 부분은 면접때 여쭤보시면 좋을 것 같습니다.
- 신입으로 채용을 하는 경우, 큰 기대를 하지않는다고 하셨습니다. 실제 입사 후에 같이 일을 해야하는 사람을 채용하는 과정이다보니 태도와 자세, 의지를 크게 본다고 하세요. 그 외에 자소서 및 포트폴리오에 기재한 내용은 반드시 숙지하고, 질문에 대한 대답이 떠오르지않아도 솔직하게 말씀드리고 설명에 대한 경청하는 자세를 보이시면 될 것 같습니다.
6년차가 말아주는 작계 기본훈련 후기 [수원오산화성 과학화예비군훈련장] (0) | 2024.04.14 |
---|---|
예비군 5년차 작계 기본훈련 후기 [수원오산화성과학화 예비군훈련장] (0) | 2023.04.17 |
PC방 평일 주간 아르바이트 후기 (1) | 2023.03.01 |
컴퓨터활용능력 1급 시험 후기(필기 + 실기) (0) | 2023.02.28 |
풀스택 개발자 국비지원교육 후기 (0) | 2023.02.27 |
데이터를 받아오는 작업을 하거나, 새로고침이 필요한 경우 해당 라이브러리를 사용하여 간단한게 구현할 수 있습니다.
// swipe refresh
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
<?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으로 감싸 줍니다.
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요청을 하게 됩니다.
[Android] Android studio에서 C++ 파일 로그 확인 (0) | 2023.03.11 |
---|---|
[Android] Handler postDelayed (0) | 2023.01.31 |
[Android] lottie 라이브러리를 사용하여 애니메이션 구현 (0) | 2023.01.29 |
[Android] Retrofit2 라이브러리를 사용하여 서버와 통신하기 (0) | 2023.01.29 |
[Android] slidetoact 버튼 생성하기 (0) | 2023.01.29 |
lottie 애니메이션은 카테고리 옆 이미지, 로딩 다이얼로그 등 화면을 보다 동적으로 보여주기에 목적에 따라 다양하게 활용 될 수 있습니다.
// lottie
implementation 'com.airbnb.android:lottie:5.0.2'
res 우클릭 - New - Android Resource Directory
원하는 이미지의 JSON파일을 선택해 줍니다.
<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파일을 연결 시켜 줍니다.
[Android] Handler postDelayed (0) | 2023.01.31 |
---|---|
[Android] 새로고침 구현 - swipe refresh (0) | 2023.01.29 |
[Android] Retrofit2 라이브러리를 사용하여 서버와 통신하기 (0) | 2023.01.29 |
[Android] slidetoact 버튼 생성하기 (0) | 2023.01.29 |
[Android] JSoup 네이버 날씨 크롤링 (0) | 2023.01.29 |
Retrofit2 라이브러리를 사용하여 서버와 데이터를 주고 받는 작업을 진행하겠습니다.
Retrofit2 은 서버와의 RestAPI 통신을 가능하게 도와주는 라이브러리 입니다.
retrofit 외에 통신을 가능하게 하는 라이브러리가 있지만, 속도 뿐만 아니라 많은 장점을 보유하고 있기에 Retrofit을 많이 선호 한다고 합니다.
// retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
// Gson 변환기
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
retrofit, gson 라이브러리를 추가해 줍니다.
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 주소와 서버포트를 확인하는 방법 입니다.
cmd - ipconfig 입력
sts4 실행 -> src/main/resources -> application.properties
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 주소")
브라우저에서 http://192.168.xxx.xxx:80/api/sample 을 검색하게 되면 미리 입력한 데이터를 확인 할 수 있습니다.
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 확인용) 를 추가 해줍니다.
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());
}
});
[Android] 새로고침 구현 - swipe refresh (0) | 2023.01.29 |
---|---|
[Android] lottie 라이브러리를 사용하여 애니메이션 구현 (0) | 2023.01.29 |
[Android] slidetoact 버튼 생성하기 (0) | 2023.01.29 |
[Android] JSoup 네이버 날씨 크롤링 (0) | 2023.01.29 |
[Android] CardView 추가하기 (0) | 2023.01.29 |
// slide animation
implementation 'com.ncorti:slidetoact:0.3.0'
<com.ncorti.slidetoact.SlideToActView
android:id="@+id/slide"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:outer_color="#3F51B5"
android:elevation="10dp"
app:text="슬라이드 버튼" />
SlideToActView slide;
...
slide = findViewById(R.id.slide);
slide.setOnSlideCompleteListener(new SlideToActView.OnSlideCompleteListener() {
@Override
public void onSlideComplete(@NonNull SlideToActView slideToActView) {
// 이벤트 발생 시키는 부분
slide_driver.resetSlider();
}
});
[Android] 새로고침 구현 - swipe refresh (0) | 2023.01.29 |
---|---|
[Android] lottie 라이브러리를 사용하여 애니메이션 구현 (0) | 2023.01.29 |
[Android] Retrofit2 라이브러리를 사용하여 서버와 통신하기 (0) | 2023.01.29 |
[Android] JSoup 네이버 날씨 크롤링 (0) | 2023.01.29 |
[Android] CardView 추가하기 (0) | 2023.01.29 |