News for hackers. Stuff that matters.
Re:Android permissions and hypocrisy by sschueller on Monday January 23, 2017 @04:50AM (#13461041)
Yes, you can write a background service that will be called when there is a change in the clipboard. You can even close the app and it will be restarted in the background when a clipboard change happens.

I know this because I wrote an app[1] that does precisely this and looks for a specific URL in the clipboard. I was surprised when I found out I don't need to ask for permission to read clipboard changes.

[1] https://play.google.com/store/apps/details?id=net.schueller....

Re:Android permissions and hypocrisy by m_eiman on Monday January 23, 2017 @05:11AM (#13461119)
Ouch, that sounds like something that should have a permission. Permission for background or programmatic access, none needed to receive pastes initiated by user seems reasonable IMHO.
Re:Android permissions and hypocrisy by dfox on Monday January 23, 2017 @05:31AM (#13461196)
That would require reliably deciding whether the action was in fact initiated by user, which is hard in browser environment and probably impossible for android.
Re:Android permissions and hypocrisy by poizan42 on Monday January 23, 2017 @08:45AM (#13462091)
The answer to that may actually be quite simple: The keyboard app is the one that should be allowed to read from the clipboard. Now can a keyboard spy on you clipboard contents? Sure. But it can also spy on all your keystrokes, so the trust must already be there.
Re:Android permissions and hypocrisy by dfox on Monday January 23, 2017 @09:22AM (#13462290)
That assumes that clipboard can only contain text, which I'm not sure whether is so on Android, but on all major desktop UI systems clipboard can not only contain arbitrary data, but even allows for negotiation of supported formats between source and destination.
Re:Android permissions and hypocrisy by candiodari on Monday January 23, 2017 @05:42AM (#13461241)
But, that's done on websites as well, and frankly it's annoying. Giving apps the ability to put stuff into the clipboard and extract it out again has been made too hard (and one of the few remaining applications of flash).

I'd even settle for the ability to put stuff in the clipboard programmatically ...

This is a case of overly broad security imho.

Re:Android permissions and hypocrisy by ploggingdev on Monday January 23, 2017 @06:37AM (#13461471)
> But, that's done on websites as well

Can websites running in background tabs access the clipboard contents on the Desktop?

Re:Android permissions and hypocrisy by emodendroket on Monday January 23, 2017 @07:28AM (#13461707)
In my experience browsers won't let you see the clipboard at all unless the user initiates a paste event.
Re:Android permissions and hypocrisy by btown on Monday January 23, 2017 @06:48AM (#13461516)
The spec says no, but there's no guarantee that a browser implementation doesn't "through an implementation-dependent mechanism" give this access by default. https://www.w3.org/TR/clipboard-apis/#event-handlers-that-ar...
Re:Android permissions and hypocrisy by makomk on Monday January 23, 2017 @08:38AM (#13462052)
This is, incidentally, used by KDE Connect and possibly other apps to do clipboard synchronization with PCs.
Re:Android permissions and hypocrisy by maxxxxx on Monday January 23, 2017 @11:32AM (#13463362)
Wow. That's insane.