Skip to content

Share: Successfully shared file is treated as canceled #2545

@Random90

Description

@Random90

Bug Report

Plugin(s)

Share

Capacitor Version

   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 8.4.0
  @capacitor/core: 8.4.0
  @capacitor/android: 8.4.0
  @capacitor/ios: 8.4.0

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/cli: 8.3.1
  @capacitor/android: 8.3.1
  @capacitor/core: 8.3.1

[success] Android looking great! 👌

Platform(s)

Android

Current Behavior

Share.share throws when using single click share api, like sending a file to a connected device in KDE Connect - there is no additional window or confirmation and plugin treats this like a cancelled action

Expected Behavior

share does not throw

Code Reproduction

try {
      await Share.share({ url: backup.uri, title: backup.filename, dialogTitle: backup.filename });
    } catch (error) {
      // it throws with { message: "Share cancelled"}
   }

Other Technical Details

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions