Copying an image from the clipboard

2019-08-20 01:45发布

问题:

I want to get an image which is copied from the galley to my app.Means the image will be there in the clipboard I want to get that image can anyone help me.

I need to copy the image from the clipboard and I don't want it directly from the gallery.

回答1:

I think this is as close as you're going to come to getting Gallery images into your app...

http://eggie5.com/8-hook-share-picture-via-menu-android

The article follows through all the way to an HTTP send of the image, but obviously you can just collect it as a byte[], and then do whatever you want with it after that.

It's not a copy/paste, but that's just not a mechanism that Android offers in this context, so, I'd do what I could with this solution.