In Android, How can I display an application selector based on file type?
<p>Apologies if this has already been answered - if someone can point me to an already-answered question, that would be great...</p>

<p>Very simply, I would like to be able to pop up a list of applications which can process a file of a given type - for instance, if I have a music file (mp3, ogg, whatever), I'd like to be able to display a list of all loaded media applications that can process the file and allow the user to select one.</p>

<p>I've been playing around with creating an intent to do this as follows:</p>

<pre><code>Intent myIntent = new Intent();
myIntent.setAction(Intent.ACTION_VIEW);
myIntent.addCategory("android.intent.category.LAUNCHER");
myIntent.setType("mp3");
startActivity(myIntent);
</code></pre>

<p>but I've obviously gotten it wrong, since it crashes every time. Should I be using ACTION_PICK or ACTION_CHOOSER instead of ACTION_VIEW?</p>

<p>More importantly, is it possible to easily define all media players by something other than the Intent.type? I believe type should be a proper MIME type, in lower case, but I'm not sure what to use in this instance...</p>

<p>Please be gentle :)</p>
