java – What is the maximum amount that can be stored in a Bundle when collapsing?

Question:

Store data in cache

@Override
protected void onSaveInstanceState(@NonNull Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putSerializable(SHEDULE, shedule);
    outState.putSerializable(RING, ringShedule);
    //outState.putString(DOC, doc_);
}

doc_ stores a fairly long string containing the html page. If you do not save it, then the entire cache will be loaded and the activity will be restored. If you save, then the activity will not be restored, but the main activity will be loaded. As I understand it, the application saves, but cannot restore this long string?

Answer:

Due to the fact that Bundle's data is flying over IPC, the limit is 1MB. According to the English answer

Scroll to Top