3 ms·
>will you lose out by only checking the clipboard when the user hits your text input field? Is it that much to ask that you find the least offensive way to serv
by CGamesPlay 6y ago
>will you lose out by only checking the clipboard when the user hits your text input field? Is it that much to ask that you find the least offensive way to serve your user?
In your toy example of my app's main screen being a text box where the user can insert a tracking code, yes, I do lose by making the user wonder every time "you know I have a tracking code why are you making me type it in?" In a more realistic example of, say, Amazon, where the "track my previous order" button is not the main screen of the app, the convenience is further increased by doing the detection automatically.
And what about non-text clipboard contents? Not every interface is a text-style document into which content can be embedded. Even "Copy URL" requires knowing that "share website" shared a URL and not a website. It doesn't make sense for images at all.
- manicdee 6y agoClearly there needs to be a way for the parcel tracking app to tell the OS, “I am looking for plain text strings that match this pattern.” Which iOS and macOS already have, they are called data detectors. When the message arrives notifying you of the tracking number, you can select “track this parcel” from the context menu. No need for an app to snoop on the clipboard.
- jurip 6y agoI know what data detectors are, but I most certainly don't get any such tracking option for any of my messages containing tracking codes. I still need to copy those codes into Parcel, and find the automatic pasteboard reading useful. And UIPasteboard doesn't offer such an API, AFAICT.
- patrickyeon 6y agoI'm not an iOS developer, but I think "Sharing and Actions" [0] is the right thing? In Android, 5 years or whatever ago it was by binding to an "Intent" IIRC. If I copy a link on Android, I can go to Chrome, click on the address bar, and it suggests "link you copied: $whatever". This is how this should work. If there's an image in my copy buffer, it doesn't need to do anything. I don't need Chrome monitoring my copy buffer when I'm doing other things in case I copy something that looks link-like. [0] https://developer.apple.com/design/human-interface-guidelines/ios/extensions/sharing-and-actions/ https://developer.apple.com/design/human-interface-guideline...