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

[How to use] Unable to Edit Existing AssetEntity Object #951

Open
Rohan-ManekTech opened this issue Jul 21, 2023 · 1 comment
Open

[How to use] Unable to Edit Existing AssetEntity Object #951

Rohan-ManekTech opened this issue Jul 21, 2023 · 1 comment

Comments

@Rohan-ManekTech
Copy link

Platforms

dart

Description

The current implementation of the Photo_Manager repository lacks a straightforward method for editing existing AssetEntity objects. While it provides functionality to create new AssetEntity instances to manage assets like photos and videos, there is no apparent way to modify the properties of an already existing AssetEntity object. This limitation hinders users from updating metadata, adding tags, or making other changes to assets already part of the library. This issue requests the Photo_Manager team to consider adding support for editing existing AssetEntity objects or provide guidance on effectively achieving this capability. Addressing this matter would greatly enhance the usability and flexibility of the library, benefiting its users in managing assets more efficiently.
Ex. I want to update my existing AssetEntity object after cropping an image

My code

No response

Try do it

No response

@CaiJingLong
Copy link
Member

The common editing function of the system's own photo album in android does not modify the old one, but is similar to "save as", that is, creating a new one, such as the Photos application that comes with the Google emulator.
It is different in iOS, the adjustments that come with the system are all based on the original PHAsset, and support operations such as restore (not supported by video).


After talking about the system provider's suggestion, let's talk about whether it can be modified.

Theoretically, in Android, as long as you have the read and write permission of the original file, you can modify the source file. However, many fields in MediaStore are read-only fields. This requires special attention, and it is necessary to collect the differences of each version.

In iOS, you can create an adjusted Data and save it, but this has not been covered before, and the document description is not detailed enough, so more information needs to be collected.


From the perspective of API design, it can be done. But the whole is more complicated, the development cycle cannot be guaranteed, and there is no guarantee that it can be realized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants