Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Allow to copy text to clipboard on android app #14

Open
CounterFlow64 opened this issue Dec 25, 2022 · 4 comments
Open

Allow to copy text to clipboard on android app #14

CounterFlow64 opened this issue Dec 25, 2022 · 4 comments

Comments

@CounterFlow64
Copy link

I'm not sure if this is a bug or not, but being able to copy the text output to clipboard would make the app... actually usable for my use case. Is this actually not possible, or am I missing something?

@CounterFlow64 CounterFlow64 changed the title Allow to copy text to clipboard Allow to copy text to clipboard on android app Dec 25, 2022
@nyadla-sys
Copy link
Contributor

I am unsure of how to add this feature to the Android app as I am not an Android app developer. If someone has an idea, we can include the change in the Android app

@jeb2112
Copy link

jeb2112 commented Mar 22, 2023

It is straightforward, I had implemented it (in about the simplest possible way, ie no error checking) with an earlier codebase example from pytorch running wav2vec2 model:

    import android.content.ClipboardManager;
    ....
    private void copyToClipboard(String text) {
        ClipboardManager clipboard;
        clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
        ClipData clip = ClipData.newPlainText("simple_text",text);
        clipboard.setPrimaryClip(clip);

    }

will be trying out this same function with this current openai/whisper example soon.

@nyadla-sys
Copy link
Contributor

Great and thanks

@Usama9999
Copy link

Can someone please help me to run this android application. I would be very thankfull

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants