Skip to content

feat(android): 支持 Android Motion Photo,复用 isLivePhoto 与 LIVE 角标#1367

Open
HumorSmith wants to merge 5 commits intofluttercandies:mainfrom
flix-pro:main
Open

feat(android): 支持 Android Motion Photo,复用 isLivePhoto 与 LIVE 角标#1367
HumorSmith wants to merge 5 commits intofluttercandies:mainfrom
flix-pro:main

Conversation

@HumorSmith
Copy link
Copy Markdown

  • 新增 MotionPhotoUtils:通过 EXIF/XMP MicroVideo、MotionPhoto 检测 motion photo
  • AssetEntity 增加 subtype 字段,motion photo 时设为与 iOS live photo 相同取值
  • CursorExtensions 在构建 Asset 时检测并设置 subtype
  • ConvertUtils 向 Flutter 传递 subtype
  • 更新 entity 注释:Android motion photo 亦视为 isLivePhoto

- 新增 MotionPhotoUtils:通过 EXIF/XMP MicroVideo、MotionPhoto 检测 motion photo
- AssetEntity 增加 subtype 字段,motion photo 时设为与 iOS live photo 相同取值
- CursorExtensions 在构建 Asset 时检测并设置 subtype
- ConvertUtils 向 Flutter 传递 subtype
- 更新 entity 注释:Android motion photo 亦视为 isLivePhoto

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown
Member

@AlexV525 AlexV525 left a comment

Choose a reason for hiding this comment

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

  • 移除 AIGC 注释
  • 对外接口复用 Live Photo 相关命名,不使用 Motion Photo,比如 saveLivePhoto
  • 回滚非必要修改,比如 example 中 SDK 和 DEVELOPMENT_TEAM 的配置
  • 代码格式化

}
}
// AIGC START - detect motion photo when width/height already set (no exif opened above)
if (type == MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE && !mimeType.contains("svg") && imageSubtype == 0) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

cursor 转换时对每一张图片都进行 XMP 解码会大幅增加列表加载时长;考虑重新设计接口为异步

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.

2 participants