Skip to content

Feature/background work#65

Merged
git-jr merged 9 commits intomasterfrom
feature/background-work
Jul 30, 2025
Merged

Feature/background work#65
git-jr merged 9 commits intomasterfrom
feature/background-work

Conversation

@git-jr
Copy link
Collaborator

@git-jr git-jr commented May 29, 2025

Descrição

  • Added background tasks using WorkManager on Android and BGProcessingTask on iOS
  • Periodic notifications featuring the most recently top-rated movie

Testes Realizados

Manual testing on Android (physical device and emulator) and iOS (physical iPhone; not supported on simulator)

Screenshots

----Android

Backgorund-Work-Android.mp4

----iOS

Backgorund-Work-IOS.mp4

Checklist

  • Os testes foram executados e passaram com sucesso.
  • As alterações de código seguem as diretrizes de estilo do projeto.
  • Foram adicionados testes, se aplicável.
  • Se inscreveu no canal?😛

@git-jr git-jr requested a review from a team as a code owner May 29, 2025 00:09
@github-actions
Copy link

github-actions bot commented May 29, 2025

🦙 MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors Warnings Elapsed time
⚠️ KOTLIN detekt yes 56 no 5.8s
❌ MARKDOWN markdownlint 6 84 0 0.76s
⚠️ YAML prettier 6 1 2 0.8s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@git-jr git-jr force-pushed the feature/background-work branch from 18b27b6 to 0859232 Compare May 29, 2025 00:36
@git-jr git-jr closed this May 29, 2025
@git-jr git-jr reopened this May 29, 2025
Copy link

@gabrielbmoro gabrielbmoro left a comment

Choose a reason for hiding this comment

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

Just commenting a strategy that could improve the code readability

implementation(libs.koin.core)
implementation(projects.coreShared)
implementation(projects.featureListStreams)
api(libs.kmpnotifier)

Choose a reason for hiding this comment

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

#question

Can we use implementation instead of api here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need to access the notifications lib in different modules (background, general and in the IOS APP), hence the use of the API

import com.codandotv.streamplayerapp.core_background_work.SyncManager
import org.koin.dsl.module

object SyncModule {

Choose a reason for hiding this comment

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

Maybe it would be easier we have SyncManager as an interface, both implementations be defined at androidMain, and iosMain.

You can achieve that by using:

expect fun provideSyncManagerInstance(): SyncManager

val module = module { single { provideSyncManagerInstance() }

In the androidMain, you can define an actual (the same on iOS).

@git-jr git-jr merged commit 49804a5 into master Jul 30, 2025
4 checks passed
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