Intent to open twitter client on Android

Many Android developers ask how to start the default twitter client from their application. Which Intent should you use?

It is often advised to send an Intent with ACTION_SEND. However, many programs will fire up: Gmail, SMS send, dropbox, twitter clients, MMS Send, flickr send, etc. This is too broad.

On the other hand, some people advise to filter on the MIME type application/twitter. But this is too restrictive: very few clients will recognize this unofficial/non-standardized MIME type (twidroid is among them, but HTC default client is not).

Eventually, I came up with the following solution: list all applications that reply to ACTION_SEND and filter on known package names.

Hope this helps!