Skip to content

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

Draft
HumorSmith wants to merge 6 commits into
fluttercandies:mainfrom
flix-pro:main
Draft

feat(android): 支持 Android Motion Photo,复用 isLivePhoto 与 LIVE 角标#1367
HumorSmith wants to merge 6 commits into
fluttercandies: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>

@AlexV525 AlexV525 left a comment

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.

  • 移除 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 解码会大幅增加列表加载时长;考虑重新设计接口为异步

…7 崩溃

在特定 iOS 版本上,PLPersistentContainer 初始化 CoreData 时断言失败
抛出 NSInternalInconsistencyException,导致 SIGABRT。
添加 @try/@catch 保护关键调用点,异常时返回 nil 而非崩溃。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AlexV525
AlexV525 marked this pull request as draft July 22, 2026 05:44
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