You have two things you need to do really.
The first one is persisting your state - basically, you need to be able to store the information you're holding (references to images, any ordering they have, which one is associated with which weather type etc), and then restore it when the app opens again.
Here's the documentation overview for different ways of storing data, but there's two main options - some kind of database, or SharedPreferences
. SharedPreferences
sounds like it's about preferences, but it's really a simple key/value store for things like Strings, ints, mayyybe more complicated structures if you serialise them (you probably don't need to worry about that). Here's how you use it, and if you want to save a bunch of file paths as strings that might be your best bet
The other thing you need to worry about is access to the actual images. Here's how you can open a system file picker, and here's some details about giving yourself permanent access, so you don't lose it after reboots. This might be a little complicated, so you might want to consider importing the images, saving copies to your app's own storage space (see the first link) - basically, once you have your own copies, you can read and write them as you like and you can just store File
paths as strings, so saving and restoring is pretty simple. You need to handle cleaning them up when they're not in use anymore though!