android.os.TransactionTooLargeException on Nougat solved

Md. Masud Parvez
6 min readMar 2, 2018
Too Large Right!!!

Recently i was just working in a wallpaper application. In this application i have to maintain lot’s of data almost 1M in diffident category. For UI i am using sliding tab let 6 tabs.

Sliding Tab

So when i sweep from one tab to another tab and came to my previous tab. I was wondering my previous data was missing so i think why not i save data in my savedInstanceState using Parcelable ArrayList . So i write code for

this just implement Parcelable into my pojo class. Then i started to save data in my savedInstanceState. Like

@Override
public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState);
Bridge.saveInstanceState(this, outState);
ArrayList<WallpaperItem> wallpaperItems = adapter.getAllWallpaper();
if (wallpaperItems!=null){
outState.putParcelableArrayList(Constant.SAVE_INTO_ALL_WALLPAPER , wallpaperItems);
}
}

and i was retrieving data like..

if (savedInstanceState!=null){
if (savedInstanceState.containsKey(Constant.SAVE_INTO_ALL_WALLPAPER)){
ArrayList<WallpaperItem> newList =…

--

--

Md. Masud Parvez

Android Application Developer and love to learn new tech. I believe the hardest job is to develop simple thing. Shoot me(pavelcep.sust11@gmail.com) for project