ACTION_GET_CONTENT is the standard intent to do this. I don't know why you are also setting CATEGORY_ALTERNATIVE, but don't. (You will want to use CATEGORY_OPENABLE if you only want data that can be opened as a stream, as described in the docs.) If you use GET_CONTENT with type */*, then anyone who can let the user pick data will be available.
As far as the music picker playing the music... yes it does, so the user can hear what they are actually picking. This is a feature. http://developer.android.com/reference/android/content/Intent.html#ACTION_GET_CONTENT On Thu, Nov 5, 2009 at 9:00 AM, Tatyana Ulyanova <[email protected]>wrote: > Hi, friends! > > In application i'm developing i need to open some standard dialog to > browse files on the phone. After picking one file i'll attach it to > the message. > In Android Dev Guide i found such way to solve my problem: > > Intent intentBrowseFiles = new Intent > (Intent.ACTION_GET_CONTENT); > intentBrowseFiles.setType("*/*"); > intentBrowseFiles.addCategory > (Intent.CATEGORY_ALTERNATIVE); > MyActivity.this.startActivityForResult > (intentBrowseFiles, PICK_FILE); > > But in that dialog, when i'm trying to pick sound file, i start to > playback. And one more problem - using that dialog i can see only > gallery and music tracks. > > Is there any other way to display such kind of dialog? Or maybe stop > to playback the music? > > Thanks :) > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

