4 ms·
Linking is one of the things that I think Android got right over iOS. Google -- web company that they are -- smartly realized that their mobile OS platform need
by davesims 15y ago
Linking is one of the things that I think Android got right over iOS. Google -- web company that they are -- smartly realized that their mobile OS platform needed to borrow metaphors from the web and attempted to do this with their Intent/Activity architecture.
The challenge here is the execution -- it's Java-heavy and unwieldy compared to <a href=...>, but the basic structure is there and allows for interesting interleaving of Activities from one app into another. I haven't yet seen a lot of discussion or adoption of Open Intents, but I think it's an interesting approach. It does, again, seem to suffer from an inheritance of Java's heaviness, and that may be a fatal flaw.
http://www.openintents.org/en/intentstable http://www.openintents.org/en/intentstable
Whether this approach succeeds in sustaining rich-client apps as web apps mature remains to be seen, but I do think it points to the fact that OP's criticism was a concern in the minds of Android's developers at the earliest stages.
- themanr 15y agoAlso possible on Android is for apps to register themselves as link targets for certain domains. For example http://www.github.com http://www.github.com addresses can optionally open in the github app.
- babebridou 15y agoYou can specify your app as a receiver for as many authorities as you'd like, by the way, or even register your own schema. You can also declare your app as a content provider, which means that your app/service becomes a data source, just as the contact list, or the photo repository, and make that data available to others, defining your own private permissions, etc. My app FairyPreview for instance (https://market.android.com/details?id=com.fairyteller.linkpreview https://market.android.com/details?id=com.fairyteller.linkpr...), is registered as an authority for the myriad link minimizers out there, so whenever you click on a minimized link in the Twitter app or anywhere apart from a browser, it will suggest my app for a faster preview instead of taking hours to load a webpage designed for a desktop browser hiding behind an unknown bit.ly link, itself disguised as a t.co, for example. It's not perfect and it's very old, the code is from 2009, my very first attempt at playing with the cross-app link system, but it works pretty well still. I'm strongly thinking about opening the source code, since I don't make any money out of it (free, no ad, maybe 50 downloads :P), and there's plenty of improvements I'd love to do but don't have the time these days.
- themanr 15y agoLooks like a useful app. I'll give it a whirl. How many nested url shorteners does it follow to get to the real content?
- babebridou 15y agoI never tested this in particular, but since it uses HttpURLConnection, the following of redirections is done under the hood - I guess it would be the same limit as the default browser?
- fpgeek 15y agoWow! FairyPreview is cool and almost exactly what I want when previewing links from Twitter. I'm just sad there isn't a Share option (so I can send the link to ReadItLater, Gmail, ...). If you do open the source, I'd love to help with it.
- babebridou 15y agoI'm definitely glad you like it, it means I'm not the only one ;) I'll see what I can do about the share button & opening the source. There's definitely tons of improvements to be made.
- babebridou 15y agoWhile linking to other apps in Android is absolutely trivial and mostly painless (even considering it's java), the more tedious part is to implement the intent service itself. The "<a href=" example is the wrong one, since the call itself is practically a one-liner in java, whereas implementing the equivalent of a "Hello {{name}}, how are you since {{last-visit}}?" response would cause a hell of a lot more headache. The API is solid though, the linking is done at a very low level, and to be honest when you get the hang of it, it's hard to let go of that awesome feature of the OS. I strongly support the use of RESTful IntentServices and ContentProviders, even if you don't open them to other apps, it's specifically the part that the Android OS got right. Opening them up for other apps to link to is a one-liner config change afterwards.
- davesims 15y agoAgreed with most of your points except "mostly painless." Consider that an anchor tag is both presentation and event handler -- basically all necessary application logic -- in one line, and intuitively understood in its integration with URLs. The "one line" to start Intents in Android (usually at least two, and likely more, depending on how much other data you need to put in the Bundle or Extras or URL objects) is only the execution part, usually buried in the event handler which itself is attached to a View object which itself was defined in a layout.xml or some other visual declaration. Heavy.
- esrauch 15y agoIt isn't a fair comparison, linking from one app to another is (as far as I can think of) completely useless if the other app can't call back with data. That is adding a significant layer of necessary complexity that simply isn't possible to do at all with <a>.
- babebridou 15y agoBesides, you can put html code in textviews, webviews and their ilk, make the links clickable and the app will silently create the corresponding intents. The only aspects I can think of right now that are lost in the translation are webpage roots and local # anchors. There might be a lot more, though.
- zuppy 15y agoYou can link apps in iOS too. You can do a simple test: open safari and type fb://feed and it will open the facebook app and go to your wall. More: http://wiki.akosma.com/IPhone_URL_Schemes#Registering_your_own_URL_schemes http://wiki.akosma.com/IPhone_URL_Schemes#Registering_your_o...
- spiffworks 15y agoHow does iOS handle multiple apps registering for the same type of URL? In Android, I get a popup asking which app I want to use for this action, and an option to make that the default for future actions. Is there something similar on iOS?
- SoftwareMaven 15y agoYou get a popup asking which app to use. I don't think there is a "save as default" because that would necessitate a way to manage those defaults, which would expose the underlying mechanism to users, something Apple is generally averse to doing. The reality is that it doesn't get used a whole lot. Browsers, Dropbox, and other apps of that nature tend to provide the data while miscellaneous apps consume it.
- davesims 15y agoSure, you can open other apps and target applications with different link types, but you can't interleave functionality with nearly as much ease as in Android. Any time you click a web link from an email, or a YouTube link from Safari you see this: the current app is backgrounded and there's no simple way for the two workflows to interact. This is a major difference between the two OS's and one advantage for Android, imo.
- dredmorbius 15y ago"Opening a URL in a given app" isn't all linking provides. Linking also lets me take whatever content an app is displaying, isolate the URL, and share that externally from the app. Current apps are link roach motels: your links check in (o hai 4sqr), but they never check out.
- fragsworth 15y agoThis, I think, is the biggest advantage of the web, and why things on the web can go "viral" more than anything else. No installed/downloaded app can go viral in the same way a web app can. The barrier to entry is vastly different between the two.
- timwiseman 15y agoAngry birds?
- starwed 15y agoViral has a meaning distinct from extremely popular.
- timwiseman 15y agoYes, it means it spread through social contact such as word of mouth, and people mentioning it on social networks, or just seeing others use the product and becoming interested. This is how angry birds became extremely popular.