A Call To Action…ACTION_SEND, That Is
Generally, standards are a good thing. Generally, voluntary standards are a better thing — you can choose to follow the standard for the benefits it provides or skip it if it gets in the way or you are trying to “think outside of the box”.
(as an aside, where exactly is this “box”, anyway?)
One such voluntary standard in Android is the ACTION_SEND Intent.
Let us suppose you are creating, say, an application that plays back hosted videos. Users can browse by category, search, view related videos, and play all of them back in a streaming fashion. One other thing that might be good is to “share” videos with friends.
You could do something like this:
Intent i=new Intent(android.content.Intent.ACTION_SEND);
where … is replaced by some custom message with the video link and the string resources are tailored to fit your app.
What the user sees is a pop-up dialog where they can choose how to send the message. Anything configured to support the ACTION_SEND Intent in their activity will pop up. So, on a stock Android device, you might get Mail, GMail, and SMS. But, if the user has installed Twidroid, Twitter will show up as well, as Twidroid supports the ACTION_SEND protocol. Your app does not need to know anything about Twitter, or even if Twidroid happens to be installed — you just ask for the chooser, and let Android and the user take it from there.
If you are developing applications that offer a “send” or “share” or “post” or similar concept, consider supporting ACTION_SEND, perhaps in addition to anything you build into your application. That way, if the user has something installed that you do not support natively (e.g., a Facebook client), the user can still “share” via that service, without you having to do anything much in your application.
Conversely, if you are developing applications that send, share, or post, consider supporting ACTION_SEND as an Intent filter and sending messages you receive by that means. You gain by being automatically integrated into any other application that sends via ACTION_SEND and createChooser(). Moreover, there are hints that someday Android might support “find alternatives” — if the way the user wants to send is not on their device, the chooser dialog might offer an option to go search the Android Market for ACTION_SEND-supporting apps.
You might also like
With a brand for every personality & destination for every desire, travel is easy with the free Marriott App. Available for iPhone®, iPad®, and Android™ devices, our app makes booking
Sprint has released the first Touchscreen Android phone with integrated push-to-talk. The Motorola i1 is now available online through Sprint’s website. The headline feature is the integrated push-to-talk, a first
After seventeen years in business eBay has designed itself a new logo. A post on the company’s website outlines the reason for the changes as well as a glimpse into