Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

충남대 Android_김선규 6주차 Step2 #54

Open
wants to merge 17 commits into
base: kimseongyu
Choose a base branch
from

Conversation

kimseongyu
Copy link

Step 2

코드 작성하면서 어려웠던 점

  • FirebaseMessagingService 사용을 위한 작동방식을 익히는데 시간이 걸렸습니다.
  • 요구사항 중 백그라운드 여부 별로 Notification을 다르게 하도록 적혀있었는데 백그라운드의 경우 FirebaseMessagingService에서 기본적으로 notification을 제공하여 따로 구현하지 않아도 되었습니다. 이를 몰라서 백그라운드 여부를 판단하기 위해 오랬동안 삽질했었습니다...

코드 리뷰 시, 멘토님이 중점적으로 리뷰해줬으면 하는 부분

  • 코드 자체는 간단해서 코드 작성에 어려움은 없었습니다.

kimseongyu and others added 15 commits August 1, 2024 01:37
* Initial commit

* 충남대 Android_김선규 4주차 Step0 (kakao-tech-campus-2nd-step2#10)

* Initial commit

* Merge : android-map-keyword into android-map-search (kakao-tech-campus-2nd-step2#8)

* 충남대 Android_김선규 3주차 과제 Step1 (kakao-tech-campus-2nd-step2#47)

* docs: add step1 requirements

* chore: set for using android api

* style: rename id in layout

* feat: remove storeInfo for using api

* feat: add connecting api for searching

* style: rename variable name proper

* 충남대 Android_김선규 3주차 과제 Step2 (kakao-tech-campus-2nd-step2#85)

* style: function rename and split

* feat: Change function to fit coroutine

* docs: add step2 requirements

* style: move from main to sub file

* chore: set it up to work in the right environment

* feat: display kakao map, when app is started

---------

Co-authored-by: MyStoryG <[email protected]>

* 충남대 Android_김선규 4주차 Step 1 제출 (kakao-tech-campus-2nd-step2#47)

* docs: add week 4 step 1 requirements

* feat: add searching by saved search keyword

* chore: relocate files proper

* feat: modify adapter to make clean code

* feat: add image for marker

* feat: add layout for displaying bottom sheet

* feat: add parcelabel for easy to send data

* feat: add displaying search result

* refactor: modify class structure

* feat: add error screen and reload button

* feat: add saving and loading last position

when app is closed, save last position
when app is opened, load last position

* 충남대 Android_김선규 4주차 Step2 수정 (kakao-tech-campus-2nd-step2#73)

* style: rename variable name

* feat: add viewModel and Repository for saving last position

* refactor: classify in more detail

* test: add android UI test

* chore: add mockk test dependency

* test: add ViewModel test

* chore: add testOptions

* test: modify android ui test

---------

Co-authored-by: MyStoryG <[email protected]>
* Initial commit

* Merge : android-map-keyword into android-map-search (kakao-tech-campus-2nd-step2#8)

* 충남대 Android_김선규 3주차 과제 Step1 (kakao-tech-campus-2nd-step2#47)

* docs: add step1 requirements

* chore: set for using android api

* style: rename id in layout

* feat: remove storeInfo for using api

* feat: add connecting api for searching

* style: rename variable name proper

* 충남대 Android_김선규 3주차 과제 Step2 (kakao-tech-campus-2nd-step2#85)

* style: function rename and split

* feat: Change function to fit coroutine

* docs: add step2 requirements

* style: move from main to sub file

* chore: set it up to work in the right environment

* feat: display kakao map, when app is started

---------

Co-authored-by: MyStoryG <[email protected]>
* docs: add week 4 step 1 requirements

* feat: add searching by saved search keyword

* chore: relocate files proper

* feat: modify adapter to make clean code

* feat: add image for marker

* feat: add layout for displaying bottom sheet

* feat: add parcelabel for easy to send data

* feat: add displaying search result

* refactor: modify class structure

* feat: add error screen and reload button

* feat: add saving and loading last position

when app is closed, save last position
when app is opened, load last position
* style: rename variable name

* feat: add viewModel and Repository for saving last position

* refactor: classify in more detail

* test: add android UI test

* chore: add mockk test dependency

* test: add ViewModel test

* chore: add testOptions

* test: modify android ui test
Copy link

@omjoonkim omjoonkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2단계 진행하시느라 고생하셨습니다. :)

@kimseongyu
Copy link
Author

피드백 반영했습니다~
수고하셨습니다!!! :)


class UtilityManager {
private fun getToken(){
FirebaseMessaging.getInstance().token.addOnCompleteListener(OnCompleteListener { task ->

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UtilityManager를 추상화하고, FirebaseMessaging의 instance를 인자로 받도록 만드는 것이 테스트 작성 관점에서 더 좋습니다. :)

@kimseongyu
Copy link
Author

수정했습니다


class UtilityManager {
class UtilityManager @Inject constructor(private val firebaseMessaging: FirebaseMessaging){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

보통 서드파티 라이브러리를 사용하게 되면, 서드파티 라이브러리의 api가 변경되어도 이에 대한 영향이 적도록 각각의 인스턴스를 감싼 형태의 컴포넌트를 사용하게 됩니다.(흔히 래퍼, 매니저, 헬퍼등등의 이름이 붙은)
지금은 FirebaseMessaging 하나만 사용하니 UtilityManager로 이름 지어도 문제 없을 수 있지만, 대규모 서비스에서는 네이밍에 좀 더 신경쓰시면 좋을 것 같습니다. :)

@omjoonkim
Copy link

선규님 6주동안 과제 진행하시느라 수고 많으셨습니다 ~!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants