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

PhotoManager.editor.deleteWithIds not working on android api 29 and above #70

Closed
ibragunduz opened this issue Nov 3, 2020 · 11 comments
Closed
Assignees
Labels
b: third party This is a third party package issue. p: Android This issue only happens on Android platform. r: photo_manager Related to the photo_manager package. s: bug Something isn't working.

Comments

@ibragunduz
Copy link

PhotoManager.editor.deleteWithIds working properly on ios and up to android api 28. But not working on android 29.

  1. Clone the example flutter_wechat_assets_picker project.
  2. Go to single_assets_page.dart file.
  3. Add this (PhotoManager.editor.deleteWithIds([assets.first.id]);) line in _selectedAssetDeleteButton method's gesture detector onTap callback to delete media.
  4. Run app on emulator have api 29 and pick one photo from "Single" tab and see the selected assets panel.
  5. Touch the selected photo the delete(X) button will be available.
  6. Touch to delete button and you will continue to see your selected photo on gallery.
  7. If you run app on emulator with api 28 or below the selected photos will be deleted.

[Test on api 27]
We want to delete selected image from the gallery. And it works fine on api 28 or below.
https://streamable.com/iof195

[Test on api 29]
Please notice! After deleting the image it is not showing on gallery so its works fine on api 28 or below.
But on api 29 the deleted images showing again on gallery. Probably its not deleting anytime.
https://streamable.com/tg429z

@ibragunduz ibragunduz added await investigate The issue is waiting for further investigation. s: bug Something isn't working. labels Nov 3, 2020
@AlexV525
Copy link
Member

AlexV525 commented Nov 3, 2020

cc @CaiJingLong

@AlexV525 AlexV525 added the r: photo_manager Related to the photo_manager package. label Nov 3, 2020
@ghost
Copy link

ghost commented Nov 4, 2020

same issue

@AlexV525
Copy link
Member

AlexV525 commented Nov 4, 2020

@ibragunduz @muhammedEmir06 Could you try override the photo_manager to 0.6.0-dev.5?

dependency_overrides:
  photo_manager: ^0.6.0-dev.5

@AlexV525 AlexV525 added b: third party This is a third party package issue. and removed await investigate The issue is waiting for further investigation. labels Nov 4, 2020
@ibragunduz
Copy link
Author

@AlexV525 Unfortunately not solved.

@AlexV525
Copy link
Member

AlexV525 commented Nov 5, 2020

Thanks for the feedback. Currently reaching @CaiJingLong and debugging.

@AlexV525 AlexV525 added the s: developing This issue in under development. label Nov 6, 2020
@CaiJingLong
Copy link
Member

I published a new version: 0.6.0-dev.6.
You can try to test it.

@ibragunduz
Copy link
Author

Thank you so much @CaiJingLong . Its working properly when i try to delete only one item. But for the multiple delete it is seems have some problems. When i add more than items into the list, its asking me for every items on a new dialog. If i remember correctly, android let us to delete multiple items on one dialog screen.

@CaiJingLong
Copy link
Member

CaiJingLong commented Nov 6, 2020

@ibragunduz
API 29 not support delete multiple asset in one dialog.
API 30 support it with createTrashRequest

@CaiJingLong
Copy link
Member

The interesting thing is that both 30 and 28 are supported.

@CaiJingLong
Copy link
Member

I personally recommend following the approach in the documentation: Api 29.

@AlexV525 AlexV525 added release candidate ⚠️RELEASE BLOCKER This issue must be solved before next release. and removed s: developing This issue in under development. labels Nov 6, 2020
@AlexV525 AlexV525 added the p: Android This issue only happens on Android platform. label Nov 16, 2020
@AlexV525 AlexV525 removed release candidate ⚠️RELEASE BLOCKER This issue must be solved before next release. labels Jan 29, 2021
@AlexV525
Copy link
Member

photo_manager 0.6.0 has been published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b: third party This is a third party package issue. p: Android This issue only happens on Android platform. r: photo_manager Related to the photo_manager package. s: bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

3 participants