Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android support #34

Open
3 tasks
mks-h opened this issue Aug 29, 2021 · 6 comments
Open
3 tasks

Android support #34

mks-h opened this issue Aug 29, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@mks-h
Copy link

mks-h commented Aug 29, 2021

Hi! I see two possible uses of this library on Android:

  • By some JVM apps, through their own rust library (e.g. game engines)
  • By cross-platform term apps, through Termux (e.g. jmacdonald/amp)

The latter probably can be done by simply running process 'termux-clipboard-get/set'. About the first case — there is an easy way in SDK to use the clipboard, however, it needs to be used through JNI. This crate is used by Servo among others, so I think it'll be fine to use.

Things to think about:

  • Can the Termux case be covered by the JNI thing?
  • How to handle different Android SDKs?
  • How to test?
@chrisduerr
Copy link
Member

chrisduerr commented Aug 29, 2021

There's currently no plans to support any other platform.

I'm sorry, I was thinking this was opened against the Alacritty terminal emulator. Copypasta can certainly look into supporting Android, though it's likely nothing official maintainers are going to sink significant time into.

@chrisduerr chrisduerr added the wontfix This will not be worked on label Aug 29, 2021
@chrisduerr chrisduerr reopened this Aug 29, 2021
@chrisduerr chrisduerr added enhancement New feature or request and removed wontfix This will not be worked on labels Aug 29, 2021
@Fancyflame
Copy link

Fancyflame commented May 1, 2022

I have implemented Android support and opened a pull request to https://github.com/aweinstock314/rust-clipboard, but nobody respond. Please take a look at my fork: https://github.com/Fancyflame/rust-clipboard. I'm glad to open a pull request to this repository if needs.

Have tested on my physical phone (winit).
NDK: r22b
platform: Android 10
SDK: (I forgot, should be the latest)

@chrisduerr
Copy link
Member

@Fancyflame If you check the readme of this repo, you'll come to realize this is also a rust-clipboard fork since they didn't merge our Wayland support PR.

Your android implementation seems pretty reasonable, are you interested in sending a PR?

@Fancyflame
Copy link

@chrisduerr Of course. Please wait a moment.

@Fancyflame
Copy link

Fancyflame commented May 1, 2022

@chrisduerr I'm sorry but I found it's little difficult for me to operating this on my phone. copypasta is not completely the same as clipboard so, it may needs some extra modification. Would you mind I open PR tomorrow, when I could get my laptop? It's near 3 a.m. in China. XD

@chrisduerr
Copy link
Member

No worries, take all the time you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants