logoalt Hacker News

chinhodado • yesterday at 7:46 PM • 2 replies • view on HN

A long time ago I wrote a dictionary app for my own use, which would show word definition upon the word being copied into the clipboard (e.g. from an e-book reader app). The dictionary app would run in the background and only show the pop up on clipboard event.

Then around Android 10 they tightened security and decided background apps can no longer receive clipboard event. Which makes sense from a security standpoint, but it totally broke my dictionary app. I just wish they're a way as a developer to get around it with my own app.


Replies

anabab • yesterday at 8:28 PM

Presumably apps can plug in entries in the system wide context menu? E.g. I have an Anki menu item (not talking about app selection screen to share content!) when selecting text in Firefox

Permik • yesterday at 8:29 PM

I'm not sure if this was the documentation defined workaround, but they added the ACTION_PROCESS_TEXT intent, which could basically give near identical UX.