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

Use of clipboard #2

Closed
surbhitrao opened this issue Jun 7, 2017 · 1 comment
Closed

Use of clipboard #2

surbhitrao opened this issue Jun 7, 2017 · 1 comment

Comments

@surbhitrao
Copy link

surbhitrao commented Jun 7, 2017

Your code is working fine there was one issue of using clipboard,if user has some important information it will be overwritten with the hex code.To solve this,comment these following lines.
In Utils.java

public static void copyText(Context context, CharSequence text) {
final ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
final ClipData clip = ClipData.newPlainText(context.getString(R.string.app_name), text);
clipboard.setPrimaryClip(clip);

and

in LoneColorActivty.java

Utils.copyText(this, Utils.colorToHex(color));
and
Utils.copyText(this, e.toString());

@helloworldwriter2
Copy link

Sorry for the delay. Using the Clipboard is a documented feature of LoneColor:

As a zero interface app (without any texts, buttons or settings), LoneColor gives you feedback using the... Clipboard. Just go and paste anywhere to get the color code of the random wallpaper, or any (unlikely) error messages.

The clipboard is by definition temporary, for short-term storage and transfer within apps. Do you find yourself often in the situation in which LoneColor overwrites your important information in the Clipboard?

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

No branches or pull requests

2 participants