Faced the problem that links in the database to the existing images and audio files in the Raw and Drawable folders do not work. For example, in my database it is implemented like this:
| Sounds | Pictures |
| R.raw.sound1 | R.drawable.picture1 |
I get the data from the database like this:
int mSounds = cursor.getInt(0); int mPictures = cursor.getInt(1); And now when I try to ask for example a picture:
imageView.setBackground(mPictures); The application crashes and gives an error that mPictures empty.