Skip to content

[Bug report] addChangeCallback returns type delete for a newly added video #1308

@saurabhkumar8112

Description

@saurabhkumar8112

Version

3.7.1

Platforms

Android

Device Model

Samsung OS 14

flutter info

[✓] Flutter (Channel stable, 3.24.3, on macOS 15.6 24G84 darwin-arm64, locale en-JP)
    • Flutter version 3.24.3 on channel stable at /Users/User/fvm/versions/3.24.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (12 months ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/User/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16F6
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] VS Code (version 1.103.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.116.0

[✓] Network resources
    • All expected network resources are available.

How to reproduce?

Hello,
I was trying to use Photomanager to monitor when a new video is added. Strangely, when a new video is recorded or added, the changeNotify arguments have a type delete, even when the video is added.

For instance, every time I recorded a video I got this as the callback.

{mediaType: 3, id: 100005XXX, type: delete, uri: content://media/external/video/media/100005XXX, platform: android}

This isn't good, cause I depend on the operation type to correctly identify what to do for my app's functionality. For both insertion of a video and deletion of a video the type is delete in the callback.

Any help is useful

Logs

{mediaType: 3, id: 100005XXX, type: delete, uri: content://media/external/video/media/100005XXX, platform: android}

Example code (optional)

Add a callback to Photomanager and then observe the callback arguments when a new video is added

Contact

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Sort: Out of supportThis issue is beyond the scope of this plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions