Skip to content

Capacitor Clipboard plugin .write({image}) on Android pastes text #551

Open
@GeorgiyZhuravlev

Description

@GeorgiyZhuravlev

Bug Report

Plugin(s)

"@capacitor/clipboard": "^1.0.2",

Capacitor Version

user@theMac  ~/mobileapp   feature/qrcodes ●✚  npx cap doctor
💊   Capacitor Doctor  💊 

Latest Dependencies:

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

Installed Dependencies:

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

[success] iOS looking great! 👌
[success] Android looking great! 👌

Platform(s)

Android

Current Behavior

I write to Clipboard an image, like described here https://capacitorjs.com/docs/apis/clipboard#writeoptions
So, like this:

Clipboard.write({
   image: dataUriBase64String
})

When I paste then to any "image ready" destination, clipboard filled in iOS emulator pastes ok (image), but filled on Android emulator pastes just a text with the (valid) dataUri string, like data:image/png;base64,iVBORw....

image

Expected Behavior

Expected to have the same behavior as on iOS - if I copied the image, then it pastes the image, not the string.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions