Trying to let the user import .csv files into my app
<p>When you want to <em>export</em> a .csv, I got it to work after writing this code:</p>

<pre><code>Intent sendIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);
sendIntent.setType("text/csv|text/comma-separated-values|application/csv");
String[] mimetypes = {"text/csv", "text/comma-separated-values", "application/csv"};
sendIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
sendIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, arrayListOfUris);
startActivity(Intent.createChooser(sendIntent, "Export CSV"));
</code></pre>

<p>When you run this code, it brings up a little chooser dialog where you can export the files into GMail, Email, Android Beam, DropBox, Google Drive, etc. And it appears to work fine with multiple files.</p>

<p>However, trying to accomplish the reverse (receiving multiple .csv files) has proven to be really, really hard. And I've read so many StackOverflow threads and they're either outdated or they don't actually solve the problem.</p>

<p>I have been trying this:</p>

<pre><code>Intent receiveIntent = new Intent(Intent.ACTION_GET_CONTENT);
receiveIntent.setType("text/csv|text/comma-separated-values|application/csv");
String[] mimetypes = {"text/csv", "text/comma-separated-values", "application/csv"};
receiveIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
intent.addCategory(Intent.EXTRA_ALLOW_MULTIPLE);
startActivityForResult(Intent.createChooser(receiveIntent, "Import CSV"), REQUEST_IMPORT_CSV); //REQUEST_IMPORT_CSV is just an int representing a request code for the activity result callback later
</code></pre>

<p>However this only brings up a chooser that says there is no app that can complete this task, which I find baffling. </p>

<p>If I remove the <code>EXTRA_ALLOW_MULTIPLE</code> line, then I get two outcomes:</p>

<ol>
<li><p>If I run the app from an emulator, it goes to a file explorer where I can select a single file. As far as I can tell, that works and all, but doesn't allow me to pick multiple files.</p></li>
<li><p>If I run the app from my physical phone, it doesn't open the file explorer -- it gives me the option to import from DropBox or some other app that isn't really relevant. </p></li>
</ol>

<p>Why isn't it allowing the file explorer? Why isn't it allowing other options like Google Drive for example? Is there really no service for importing multiple files into your app? Does it only give you the file explorer when it can't find any other app to invoke? </p>

<p>My end goal here is to basically prompt the user with a chooser that lets them pick one or more .csv files from either an external app like DropBox, or from their own file system via a file explorer.</p>

<p>Or is my code wrong somehow? </p>

<p>What do I do? The Android documentation offers no help on the matter.</p>

<p>Edit: My emulator phone is a Galaxy Nexus API 23 and a Nexus 5 API 22. My physical phone is a Samsung Galaxy Note 4 (version 6.0.1).</p>