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주차 과제 Step1 #17

Merged
merged 92 commits into from
Jul 30, 2024

Conversation

khyeonm
Copy link

@khyeonm khyeonm commented Jul 29, 2024

Step1 커밋 링크

(Step1 커밋만 select 하였습니다!)
https://github.com/kakao-tech-campus-2nd-step2/android-map-notification/pull/17/files/a8910a9a5a7f13a518c1a4057a4df566a018338d..de13d90aa08ee806fb7536b4616eaf48cf562803

느낀 점

  • 이전 주차 과제들에 비해 수월한 편이었고 MVVM 아키텍처 적용도 반복적으로 사용하다 보니 익숙해지고 있다!!
  • merge 이후로 step1 branch를 만들고 코드를 작성해서 push 하였는데 이전에 비해 conflict 정도가 덜해지긴 했지만 conflict가 발생해서 merge 하였다..

khyeonm and others added 25 commits July 22, 2024 21:00
dependency injection about network
dependency injection about map utility
dependency injection about map search service
dependency injection about search save service
dependency injection about bottomsheet
Resolve errors caused by code modification during refactoring process
Utilize LiveData and DataBinding
* Initial commit

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

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

* Fix: Reflect feedback

* Fix: Resolve error

* 부산대 Android_김현민 4주차 과제 Step0 (kakao-tech-campus-2nd-step2#16)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

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

* Fix: Reflect feedback

* Fix: Resolve error

---------

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

* Docs: Update README.md

* Feat: Add location marker

* Feat: Add camera movement function

* Feat: Add bottom sheet dialog

* Feat: Add initial camera location function

* Refactor: Resolve initial camera issue and search issue

* Feat: Add map error event

* Design: Modify UI design

* Refactor: Separate function and write annotations

* Docs: Update README.md

* Feat: Add save item click function

* Feat: Add keyword search function

* Refactor: Reflect step1 feedback

* Feat: Add dependencies

* Test: Add map activity ui test

* Test: Add main activity ui test

* Test: Add main activity unit test

* Test: Add map activity unit test

* 부산대 Android_김현민 4주차 과제 Step1 (kakao-tech-campus-2nd-step2#33)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

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

* Fix: Reflect feedback

* Fix: Resolve error

* Docs: Update README.md

* Feat: Add location marker

* Feat: Add camera movement function

* Feat: Add bottom sheet dialog

* Feat: Add initial camera location function

* Refactor: Resolve initial camera issue and search issue

* Feat: Add map error event

* Design: Modify UI design

* Refactor: Separate function and write annotations

* Docs: Update README.md

* Feat: Add save item click function

* Feat: Add keyword search function

* Update README.md

---------

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

* Fix: Fix conflict error

* Chore: Add dependency and grouping

* Chore: Edit grouping

* Refactor: Change database to Room

* Fix: Resolve data integrity error

* Refactor: Apply dependency injection

dependency injection about network

* Refactor: Apply dependency injection

dependency injection about map utility

* Refactor: Apply dependency injection

dependency injection about map search service

* Chore: Edit grouping

* Refactor: Apply dependency injection

dependency injection about search save service

* Refactor: Apply dependency injection

dependency injection about bottomsheet

* Fix: Remove test code error

Resolve errors caused by code modification during refactoring process

---------

Co-authored-by: MyStoryG <[email protected]>
Utilize LiveData and DataBinding
Utilize LiveData and DataBinding
@LeeOhHyung LeeOhHyung self-requested a review July 30, 2024 17:06
Copy link

@LeeOhHyung LeeOhHyung left a comment

Choose a reason for hiding this comment

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

@khyeonm 6주차 step1 과제 고생많으셨습니다!
RemoteConfig 사용하는건 난이도가 쉬워서 그런지 빠르게 적용해주셨네요.

남긴 코멘트들은 참고하셔서 수정하신다면 step2 PR에 반영해주셔도 괜찮습니다.

Comment on lines +60 to +64
viewModelScope.launch {
withContext(Dispatchers.IO) {
db.profileDao().insertAll(*profilesList.toTypedArray())
}
}

Choose a reason for hiding this comment

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

profileDao의 insertAll도 suspend function으로 선언되어 있죠?
그렇다면, withContext로 Dispatcher를 전환해주지 않아도 괜찮습니다. Room 내부에서 비동기로 처리되게 해주기 때문이죠. 혹여나 필요하다면 viewModelScope.launch(Dispatchers.IO) 이렇게 넣어주면 withContext 단계를 생략할 수 있을듯 합니다

Comment on lines +9 to +11

class SplashViewModel(application: Application) : AndroidViewModel(application) {

Choose a reason for hiding this comment

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

hilt를 통해 의존성 주입을 받고자 한다면, @HiltViewModel 어노테이션을 붙여줘야 할것 같습니다.

Choose a reason for hiding this comment

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

SplashActivity 에도 @AndroidEntryPoint 어노테이션을 붙여줘야 할것 같네요

Comment on lines +18 to +37
init {
remoteConfigValues()
}

private fun remoteConfigValues() {
val remoteConfig: FirebaseRemoteConfig = FirebaseRemoteConfig.getInstance()
val configSettings = remoteConfigSettings {
minimumFetchIntervalInSeconds = 0
}
remoteConfig.setConfigSettingsAsync(configSettings)

remoteConfig.fetchAndActivate().addOnCompleteListener { task ->
if (task.isSuccessful) {
_serviceState.value = remoteConfig.getString("serviceState")
_serviceMessage.value = remoteConfig.getString("serviceMessage")
} else {
_serviceMessage.value = "Failed to fetch remote config values"
}
}
}

Choose a reason for hiding this comment

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

RemoteConfig로 데이터를 조회하고, LiveData를 통해 Activity에 전달해주는 코드는 훌륭하게 작성하셨습니다.

조금 개선하면 좋을 부분이요. RemoteConfig 또한 원격 저장소에서 데이터를 조회하는 동작이라 network 및 data layer (model) 쪽에 속한다고 볼 수 있습니다. 따라서 repository혹은 remote 와 관련된 클래스를 만들고, 그 클래스에서 리모트컨피그 값을 조회하도록 하는것이 조금더 좋을것 같습니다! 그 클래스는 hilt module에 선언한 후 SplashViewModel의 생성자를 통해 주입받는거죠

@LeeOhHyung LeeOhHyung merged commit beda501 into kakao-tech-campus-2nd-step2:khyeonm Jul 30, 2024
@khyeonm khyeonm deleted the step1 branch July 31, 2024 04:31
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.

3 participants