I’m trying to figure out how I can choose an image in my clipboard when the media picker window comes up.

For example, if I’m on imgur.com and I want to upload an image in my clipboard, there is no option for me to paste into the input field.

Ideally, I would like to have something available in the media picker to paste from clipboard. That would allow using clipboard for any app.

I kinda consider this something like adding the clipboard to the “share” menu. https://github.com/tengusw/share_to_clipboard

Is there anything like this?

I do not have root access on my phone.

  • davidgro@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    9 days ago

    Perhaps you can paste it into an image editor app and then save it as a file?

    Pretty sure the media picker can only pick files on Android.

    Also if the image was on screen at some point before it was on the clipboard​, you could take a screenshot as a rough workaround. Those are also saved as files.

      • davidgro@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        9 days ago

        I actually took a quick look at the Android API to see if there was an obvious way to make an app to do this, and as far as I could find, there is not. It might be impossible.

        • go $fsck yourself@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          edit-2
          8 days ago

          In the media select window I see the ability to select from other apps:

          I do have to get there by selecting “browse” from the three dots menu

          • davidgro@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            8 days ago

            Oh! Good find. Looks like the way to do this is by implementing ACTION_GET_CONTENT. I can’t help you beyond that (I don’t have a dev environment set up and am a novice anyway)

  • catloaf@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    9 days ago

    I’m not aware of any such app and I don’t see one that does this with a quick Google search. Is there a reason you’re not just sharing the image directly?

      • catloaf@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        2
        ·
        9 days ago

        No, using the share function from whatever app you’re sharing from. In Firefox, when I long-press an image, there’s a share option right there.

        I’m on Android 15 and I also get a share button when I copy an image to the clipboard too.

          • catloaf@lemm.ee
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            2
            ·
            9 days ago

            That is what the share function does, when you choose to share to an external location. If you have the imgur app, you can choose it as a destination from the share menu and it will upload it.

            • go $fsck yourself@lemmy.worldOP
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              9 days ago

              Imgur was only an example. I don’t want to use imgur’s app and there are other websites or apps that I would like to upload to that do not work in that way.

              I just want to be able to select an image from my clipboard when an app wants me to select an image from my phone.