I have 11Mb JSON file and these file will be write on Dao but when I save all data. I got this error;
/data/user/0/com.test.save/databases/ChannelDb-wal 6946352 bytes: Bigger than 1048576; truncating
My codes;
AppDatabase dbRoom = Room.databaseBuilder(getApplicationContext(),
AppDatabase.class, Constants.CHANNEL_DB).build();
AndroidNetworking.get(user.getRemote())
.setTag(Constants.GET_CHANNEL_LIST)
.setPriority(Priority.HIGH)
.build()
.getAsOkHttpResponseAndParsed(new TypeToken<List<Channel>>() {
}, new OkHttpResponseAndParsedRequestListener<List<Channel>>() {
@Override
public void onResponse(Response okHttpResponse, List<Channel> channels) {
AsyncTask.execute(() -> dbRoom.channelDao().insertAll(channels));
}
@Override
public void onError(ANError anError) {
Log.d(TAG, "Check 4");
hideProgress();
Toast.makeText(getApplicationContext(), getResources()
.getString(R.string.an_error), Toast.LENGTH_LONG).show();
Crashlytics.log(Log.DEBUG, TAG, anError.getErrorDetail());
}
});