Open vishnukvmd opened 3 years ago
First, https://github.com/CaiJingLong/flutter_photo_manager#observer .
Second, why would you need a function when an app is no longer alive?
@AlexV525 Thanks for the response.
In my specific case, I'm building an app like Google Photos, that automatically backs up the photos that you take on your phone.
With the current implementation of the observer, I have to wait for the app to be opened for the photos to be backed up.
If the observer could also execute my callback function whenever a photo is taken, regardless of whether the app is alive or dead, that would greatly simplify the situation.
Is this issue resolved?
Hey @AlexV525, we've worked around this issue inefficiently by using flutter_background_fetch to periodically call PhotoManager.getAssetPathList
.
If adding a JobScheduler
to listen for changes in the background is within the scope of this project (as explained here), I would request you to leave this issue open (and perhaps mark it as help needed
). But if you think that this is outside the scope of this project, please do close the issue.
Currently I'm using flutter_background_fetch to periodically call
PhotoManager.getAssetPathList
to find photos and videos that were added/modified.Would it be possible for
PhotoManager
to accept a function that should be executed each time the device gallery is modified, even if the app is not running?Thanks again for the great library. Please let me know if I can help.