Android reading file from memory card limits to 10kb on samsung phones
<p>I'm trying to read contents from a file stored on the sdcard on an android phone. For this I use the following code:</p>

<pre><code>public String readIt(File file) {
    StringBuffer sb = new StringBuffer();
    try {
        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));
        String line;
        while (( line = reader.readLine()) != null) {
            sb.append(line + '\n');
        }
        reader = null;
    } catch (FileNotFoundException e) {
        Toast.makeText(this, "File not found", Toast.LENGTH_SHORT).show();
        return null;
    } catch (IOException e) {
        Toast.makeText(this, "Error reading file", Toast.LENGTH_SHORT).show();
        return null;
    }
    return sb.toString();
}
</code></pre>

<p>This has been bothering me for a while, any idea of why it cuts of on samsung phones? And does anyone have a suggestion of how to solve it and also keeping the file encoding when reading it?</p>
