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


Store data in cache

protected void onSaveInstanceState(@NonNull Bundle 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?


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

Scroll to Top