Apps How to run app in background with other apps
- By Hadron
- Android Development
- 1 Replies
For copied text the obvious way is to use the system "clipboard". That's what it's for, to copy text strings from one app and paste them into another. I'm sure you can make your app automatically access the clipboard when you switch focus to it(*), you'd anyway have to use the normal select and copy features to put things into the clipboard, so the thing that's missing is your preferred UI of "dragging" the selected text onto your button. That however I can't help with, since I don't actually develop for Android.
(*) Of course whether I'd want an app that automatically accesses anything that's in the clipboard whenever I open it, without any interaction from me, is a different question. There are potential privacy issues there, e.g. if someone uses the clipboard to copy a password or bank account number it probably won't occur to them that your app could grab those data if they haven't cleared the clipboard or replaced its contents before they next opened your app. But you would probably not be unique in doing this, as I believe I've read that clipboard security in Android is less than stellar.
(*) Of course whether I'd want an app that automatically accesses anything that's in the clipboard whenever I open it, without any interaction from me, is a different question. There are potential privacy issues there, e.g. if someone uses the clipboard to copy a password or bank account number it probably won't occur to them that your app could grab those data if they haven't cleared the clipboard or replaced its contents before they next opened your app. But you would probably not be unique in doing this, as I believe I've read that clipboard security in Android is less than stellar.

Just because you use an Android device, there's no obligation to use Google's online services with it. I use OneDrive myself, and I don't even use Windows. I have Android devices and Apple Macbooks.