Skip to content

Auto-refresh feature #7

@jeffchao98

Description

@jeffchao98

Tech Plans

  • Modified the LiveData in the ViewModel, which we need a in-model method for trigger the call-api-logic
    • For now, the logic inside is one-time logic when the observer been setup in the fragment
    • Can reference the article for learn how to do it
    • In the official document , we can find out how to use MutableLiveData().switchMap instead of Transformations.switchMap in the last reference article
  • Implement the logic which can execute the logic repeatedly
    • Can reference this article for learn how to use Handler , Runnable
    • Place the countdown object and the related logic in Fragment, and execute the in-ViewModel method for call api and refresh the data
  • Time period: 30-minute

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions