How to list all video files on device
<p>I want to get all videos path in android (Internal and External storage both), I have tried use: </p>

<pre><code>List&lt;String&gt; paths = new ArrayList&lt;String&gt;();
File directory = new File("/system" OR "/mnt/sdcard");
File[] files = directory.listFiles();
for (int i = 0; i &lt; files.length; ++i) {
    if(files[i].getAbsolutePath().contains(".mp4")) {
       paths.add(files[i].getAbsolutePath());
    }
}
</code></pre>

<p>but I can not get all of video lists from my device.</p>