Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you take a look at the <a href="https://android.googlesource.com/platform/packages/apps/Music/+/jb-release/AndroidManifest.xml" rel="nofollow">AndroidManifest.xml</a> file for the latest core Music app, it may shed some light on the options that you have. For example:</p> <pre><code>&lt;activity android:name="com.android.music.MusicPicker" android:label="@string/music_picker_title" android:exported="true" &gt; &lt;!-- First way to invoke us: someone asks to get content of any of the audio types we support. --&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.GET_CONTENT" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;category android:name="android.intent.category.OPENABLE" /&gt; &lt;data android:mimeType="audio/*"/&gt; &lt;data android:mimeType="application/ogg"/&gt; &lt;data android:mimeType="application/x-ogg"/&gt; &lt;/intent-filter&gt; &lt;!-- Second way to invoke us: someone asks to pick an item from some media Uri. --&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.PICK" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;category android:name="android.intent.category.OPENABLE" /&gt; &lt;data android:mimeType="vnd.android.cursor.dir/audio"/&gt; &lt;/intent-filter&gt; &lt;/activity&gt; </code></pre> <p>So based on this, you might first try</p> <pre><code>final Intent intent2 = new Intent(Intent.ACTION_GET_CONTENT); intent2.setType("audio/*"); startActivityForResult(intent2, 1); </code></pre> <p>and see if it fits your needs. You may also look at adding the category flags noted in the above example to help narrow down the results (e.g. <code>OPENABLE</code> should filter to only content that can be opened as a stream.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload