I'm building an app which will allow the user to upload their own icons for use within the app (these will be small .png or .gif files). I want to include a default set of icons, and then allow the user to add their own.
I'm trying to figure out the best way to do this - there seem to be various solutions online and I'm not sure which is best for my purposes. As I said, I'd like to supply a default set of icons with the app, to be stored on the user's device. The user should then be able to add more icons, which should also be stored on the device (at some point later on the user can choose to upload the icons to a central server so that other people can use them too).
Currently I've tried adding the default .png files manually to Android Studio's 'drawable' folder, and then storing the resource id in the database. The resource id seems to keep changing, though, so the wrong icon is being loaded most of the time. So, instead I believe I need to store the name/path of the .png file in the database. Would that be correct? If so, is there a standard file path that leads to the 'drawable' folder?
And what about the user uploading icons? Should I just save these to a particular directory, and then store the path in the database? Or is there a better way to handle this?
What kinds of things should I be considering? The icons should be 64x64 max, or thereabouts (I haven't totally decided yet, but they won't be much bigger than that - we're not talking about 1000x1000 or anything). In theory the user can add as many as they want, but in practice I imagine most will use the default set, and a few will add up to 20-30 icons of their own.