I am trying to read an assets file using InputStream but it throws OutOfMemory Exception , the size of file is 22 mb ( about 22 Million Bytes ! )
This is the code I use
try{
java.io.InputStream is = MainActivity.this.getAssets().open("file.json");
int Si = is.available();
byte[] Bu = new byte[Si];
is.read(Bu);
is.close();
data = new String(Bu, "UTF-8");
}catch(Exception e){
}