전체 글
-
Firestore에 데이터 추가하기 (안드로이드)카테고리 없음 2020. 12. 18. 17:52
(안드로이드 스튜디오 & 코틀린 기준 설명) (이번 편에서는 CRUD 중 Create 기능에만 집중하여 설명합니다.) 일단 firebase 프로젝트를 만들고, 앱등록을 하고, 안드로이드 스튜디오와 구글계정 연동 작업도 진행해야 한다. 여기까지는 검색하면 많이 나오는 부분이니 생략. 여기까지는 각자 알아서 완료하고 오세요... 이제 firestore를 사용 가능하도록 설정한다. 필자는 아래의 링크를 참조하였다. [Firebase] Cloud Firestore 데이터 생성 방법 :: Copy Coding (tistory.com) 프로덕션 모드와 테스트 모드에 대해서 얘기하자면, 프로덕션 모드로 할 경우, Firestore 하나를 쓰기 위해 Authentication 까지 공부해야 하는 사태가 일어난다. 실제..
-
화면 회전하면 Fragment가 두 번 호출되는 문제카테고리 없음 2020. 11. 11. 21:06
상황: Activity에 Fragment를 붙여놓고 Activity가 생성되면 자동으로 Fragment가 생성되도록 해놨다. 무슨 말인지 이해가 안 되면 조금 내려서 나오는 첫 번째 코드를 참고하자. 문제: 화면을 회전시키면 액티비티가 Destroy되었다가 다시 생성된다. 액티비티, 화면, 회전, 생명주기(activity, screen, rotation, lifecycle)의 키워드로 검색하면 많이 나올테니 자세한 설명은 생략한다. 여기까지는 좋은데, 한 번 회전시킬 때마다 Fragment가 두 번씩 생성되는 문제가 생겼다. 아래와 같은 코드로 로그를 찍어 확인해보았다. 액티비티 코드: class MainActivity : AppCompatActivity() { private val TAG = "Acti..
-
GitHub Archive Program 취소하는 방법카테고리 없음 2020. 11. 3. 14:15
왜 이제까지 발견하지 못했는지 모르겠지만 내 깃헙 프로필에 Arctic Code Vault Contributor 라는 뱃지가 달려있었다. 뱃지에 마우스를 올려보니 올해 1,2월쯤에 만들어 올린 카드게임 프로젝트가 GitHub Archive Program에 선정되었다나 뭐라나... 카드게임 프로젝트가 뭐냐하면 c언어를 처음 배우고 예제 프로젝트로 만든 카드게임인데... archiveprogram.github.com/ Arctic Code Vault Contributor를 인터넷에 검색해보니 GitHub Archive Program에 기여한 사람들한테 주는 뱃지인데, GitHub Archive Program는 인터넷 저장소가 사라졌을 때를 대비해 1,000년 이상 코드 사본을 필름에 인쇄해서 북극에 보관하는..