News for hackers. Stuff that matters.
Re:What iOS Can Learn from Unix by fournm on Monday September 09, 2013 @01:00PM (#6354591)
From a user perspective, intents are more useful and cover almost everything they're talking about. Most people really don't want to think about the how, they just want to share something to Facebook somehow. Having a standard way to just hook the Facebook app for it is what they really need.

It is a shame that we can't get more app functionality sharing in place, but really I don't know if we necessarily want to bring that much dependency management into the mobile space at large either.

Re:What iOS Can Learn from Unix by jerf on Monday September 09, 2013 @01:59PM (#6355032)
I am not an Android developer. Is it possible for an application to create a new Intent, and then have another application use it, or can they only be blessed by Google?
Re:What iOS Can Learn from Unix by jordanthoms on Monday September 09, 2013 @03:58PM (#6355751)
Yes, it's possible. In fact, it's the whole idea. There is also content providers, which allows an app to give another app access to it's data. In fact, intents are how an app launches a new screen when you press a button etc - by sending an intent to the system telling it to launch a new activity.

Some of the UX around intents isn't great, but the core concept and implementation is very clever and doesn't get the attention and respect it deserves. Much like many aspects of Android.

Re:What iOS Can Learn from Unix by myko on Monday September 09, 2013 @02:15PM (#6355150)
It is possible, and even encouraged.
Re:What iOS Can Learn from Unix by jerf on Monday September 09, 2013 @02:20PM (#6355188)
Thank you.
Re:What iOS Can Learn from Unix by rcoh on Monday September 09, 2013 @01:09PM (#6354657)
Intents are useful, but could be better. A standard way to hook into the Facebook app is fine for Facebook but what about when the space is more fragmented? Should app authors have to integrate with every document viewer or Mail App?
Re:What iOS Can Learn from Unix by rgbrgb on Monday September 09, 2013 @01:49PM (#6354953)
I think the document manager [1] covers this use-case rather well. Any app can register with the OS as being able to open a certain type of file. Then it's just a couple lines to show the user an "Open in..." prompt for a file. This is what Dropbox, Mail, and GDrive do and I think we're going to see a lot more of it in the future.

[1]: https://developer.apple.com/library/ios/documentation/FileMa...

Re:What iOS Can Learn from Unix by krschultz on Monday September 09, 2013 @03:01PM (#6355441)
You don't have to tie into any particular document viewer at all, in fact the default behavior is exceedingly simple. Call an ACTION_VIEW intent, provide the file argument, and the OS finds the right viewer that is already installed. The app I write doesn't have to know about the difference between .dxf and .xlsx at all, as long as the user has the right viewers. I can't honestly imagine an easier API than that.

In my app, I went one step further and when the user doesn't have an app installed for the given file type, I recommend one, but that isn't a requirement. I keep track of what percentage of view file requests are fulfilled by an already installed app, and it is generally over 95%.

I think you guys should better understand Intents before you trash them (and actually try to replicate them on iOS). Why was the use of Intents so minimal in the Filepicker.io Android library? I replaced that library with a intents and have a much more robust application.

Re:What iOS Can Learn from Unix by Navarr on Monday September 09, 2013 @01:13PM (#6354684)
Standard way to hook into the Facebook app is a "Share Intent" which can be picked up by any other social network application; such as Google+, my text messaging app, Google Hangouts, and so many others. Even allowing "copy to clipboard" and "Pin" and whatever else. Almost every Android app creates a Share Intent listener to pull in data.

If there's a document viewer, it'll listen in for the file types it supports when you try to open a file (I think its a VIEW intent). It's all very impressive and very, very useful.

Re:What iOS Can Learn from Unix by alayne on Monday September 09, 2013 @01:18PM (#6354713)
Unless they've changed it, you'll have to use the FaceBook SDK to do anything more than post a URL. FB's intent support is bad.
Re:What iOS Can Learn from Unix by rcoh on Monday September 09, 2013 @01:18PM (#6354714)
Ah, yeah. I was talking about iOS in particular. Android intents are pretty sweet -- a couple the missing bits to make them great in my mind are -- App discovery: tell me about apps that can use my content if I don't have any? -- Action curation: What do users think are the best app for this action?