Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not sure I follow -- I was isolating the case of simply launching an external Activity, analogous to clicking a hyperlink to a separate webpage. Just adding data to an Intent (similar to the way you'd add arguments on URL params) can require several extra lines, plus, again the fact that you still haven't accounted for setting up the event handlers, the View object that responds to the click, etc.

I'm not knocking Android -- I'm an Android dev. The point I'm trying to make is that building out an ecosystem of interconnected links is hard. The web accomplished this by making the markup for those links very very simple. The total amount of code and setup for one Android application to launch another is far more complex than writing one anchor tag. This is at least a barrier to more widespread adoption of something like Open Intents, etc.



I didn't mean to imply that you thought Android web intents were poor, I just don't think that <a> is a relevant analog. My point is that the nature of links are not the same. There is no way for a website to pass data back to you and the links are completely static. Generally if the links have url params then they link is generated by some serverside template renderer and its disingenuous to compare just the output from that program to the source from another program.

XHR requests are much more of an analog to Intents than <a> links are, and they are a similar order of complexity.


90% of my use cases when I launch an external Activity (email, maps, sharing, etc.) I don't get data back, so I guess from my POV anchors are good analogies.

And how is Ajax not precisely an example of a website passing data back? It's all just servers responding with json or xml or html, whether it's a GET from an anchor tag or data from an Ajax call. I just don't make that distinction -- it's all HTTP to me.


My point was that Ajax (XHR) is pretty much the same thing as launching an Intent, and it is pretty much as complicated as launching an Intent.

I would hesitate to say that Ajax and Intents are precisely the same since with Intents app gets paused and waits, with Ajax the user will often expect the website to still be functional while the Ajax call is still working. If you click the up arrow on a comment you wouldn't expect the Reply button to not work until the Ajax request has called back.

That said, I never meant to indicate that there was a big difference between an XHR request and launching an intent; I was merely trying to point out that an <a> tag is notably different in functionality than both a ajax request or an intent launch.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: