Reputation: 21
i am looking to save data to the device my Pre Delivery Checklist App is runing on (hence all the boolean data(for the checklists)). The data would look something like this:
List<List> listOfCars = [
//CUSTOMER 1
[false, "CUSTOMER NAME", "REG PLATE", false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, ],
//CUSTOMER 2
[false, "CUSTOMER NAME", "REG PLATE", false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, ],
];
I know this probably isnt the best way to store the data anyway but it works for now.
All i am looking for is a way to save it when the app closes and a way to restore the data when the app opens again. i have tried using sharedPreferences but only have luck setting hardcoded data. Is there any way i can do this please?
Thank you all in advance :-)
Upvotes: 2
Views: 36