Android Studio: Load a File into an Array : <p>I have made a class that can save an array to file, yet, I need it to load the file back into an array inside of an Activity named SampleGridViewAdapter.</p>

<p>Text file format named gallerydump_img.txt:</p>

<pre><code>https://mywebsite.com/path/samplefile.rtf
https://anotherwebsite.com/
https://thirdwebsite.com/example/
</code></pre>

<p>I have tried <code>strings = LIST[i]</code>, with <code>strings</code> being the output from the file, <code>i</code> being the loop, and <code>LIST</code> being the array to output the file data to, line by line. More code below:</p>

<pre><code>@Override
    protected void onPostExecute(String[] strings) {

        for(int i = 0; i &lt; strings.length; i++) {
            Log.e("GalleryFileDump", strings[i]);
            ArrayToFile.writeArrayToFile(strings, Environment.getExternalStorageDirectory() + "/gallerydump_img.txt", "Eww, errors. Want a cookie? :: Unable to write to file gallerydump.bin. Check the report below for more information. :)");
            strings = LIST[i]
        }
    }
</code></pre>

<p>Any help appreciated. Thanks!</p>
