Skip to content

[Bug]: hide additional permission dialog on Android for file access when not needed #24

@koenmuilwijk

Description

@koenmuilwijk

Version

1.3.0

Environment that reproduces the issue

  • Android 14 device

Is it reproducible in the example application?

Not tested

Reproduction steps

final uploadToken = '...';
final videoId = '...';
final video = await ImagePicker().pickVideo(
      source: ImageSource.gallery, 
      preferredCameraDevice: CameraDevice.front,
      maxDuration: Duration(minutes: 1),
    );
if (video != null) {
  await videouploader.ApiVideoUploader.uploadWithUploadToken(uploadToken, video.path, videoId: videoId);
}

Expected result

When uploading a video an additional permission dialog is displayed on Android. However, in our use case we use ImagePicker for the user to select a file, so we don't need to ask for permission again.

Can we pass a direct link to the selected XFile or File instead of the path as string to prevent this?

Upload video without additional file permission request (already done by ImagePicker().pickVideo(...)).

Actual result

An additional permission request is displayed upon the call to uploadWithUploadToken which doesn't serve any function.

image

Additional context

Android 14 and higher.

Relevant logs output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions