aweinstock314 / rust-clipboard

System Clipboard interfacing library in Rust
Apache License 2.0
368 stars 75 forks source link

Android support #52

Open torkleyy opened 6 years ago

torkleyy commented 6 years ago

I've tried to build a project for Android and it tried to link to xcb. Turns out this library depends on xcb :)

Is Android support planned and if not, could we add a compile_error! if the target platform is Android?

aweinstock314 commented 6 years ago

Android support is in scope. It looks like the relevant documentation is here. I've asked the Servo folks about recommended crates for poking at android APIs from Rust, and will add that information here once I get a reply.

nerd190 commented 3 years ago

@torkleyy I would love this too (I use a tablet with Termux when Im away from my PC), much better than a laptop!

@aweinstock314 there is no need to find any Rust/Android APIs, Termux provide these via its termux-api (an API written in Python that can interact with our ugly Java ways :) The API provides many commands including:

The two above values are all we need added! 👍 They work exactly like xclip/xsel so use them as a template, just replace with the the relevent values with the two commands listed above (both termux commands do not take any extra args, just one to set and one to get).

It would be really appreciated! (I found a beautiful text editor but it uses this utility so I am currently unable to copy/paste). Plus, it would close this (3 year old) issue too :+1:

Here is a utility I use (for some reference), its written in Rust, provides a cross-platform clipboard-cli (that includes Android/Termux), hope it helps: https://github.com/yaa110/cb

THANK YOU!

Fancyflame commented 2 years ago

I have implemented it. Please take a look: https://github.com/aweinstock314/rust-clipboard/pull/87