Issue
Hello what is best way to save ArrayList data on app exit and then retrieve it on app start. in my app i show some data to users and data is fetched from Url and i send a post request with already seen item to exclude that data but now this only works per session now i want it to save all ids in SharedPreferences so every time use request data they see unique data not matter if they exited app or not.
Solution
Use https://github.com/kcochibili/TinyDB--Android-Shared-Preferences-Turbo
1). add TinyDB.java in your module
2). initialize TinyDB
TinyDB tinydb=new TinyDB(context);
// store Arraylist<Integer> list;
tinydb.putListInt("yourkey",list);
// retrive Arraylist<Integer>
Arraylist<Integer> list=tinydb.getListInt("yourkey");
Answered By - Nikunj Paradva