fluttercommunity / flutter_workmanager

A Flutter plugin which allows you to execute code in the background on Android and iOS.
825 stars 247 forks source link

feat: add isScheduled call #535

Closed mx1up closed 2 months ago

mx1up commented 4 months ago

checks whether a period task is scheduled. Otherwise, there is no way to know whether some work you previously might have scheduled, is actually scheduled or not.

Since periodic tasks are android only, this call is also android only.

fixes #534

related #475

zzzh commented 4 months ago

Hello, @mx1up ,

I need this too, when will it be ready to release?

mx1up commented 4 months ago

to me it's ready, just waiting for one of the maintainers to chime in ;)

zzzh commented 4 months ago

to me it's ready, just waiting for one of the maintainers to chime in ;)

Cool, looks like someone was sleeping, for weeks!

Prince2347X commented 3 months ago

Hey @mx1up, thank you for adding the isScheduledByUniqueName() method. Can we get the state of the task, instead of just a boolean telling if the work is scheduled or not, by implementing the native getWorkInfosForUniqueWork() to flutter. That would be a great addition. Please look into it if you have time.

ened commented 2 months ago

@mx1up could you please rebase & update the inline docs so it's clear this is a Android-only method?