For saving bitmap as files (png,jpeg etc) in filesDir as it received and adding the link in the room for later retrieving.
How to avoid saving duplicate bitmap as png files when saving it in filesDir.
- Store image hash in room to check when saving new bitmap for duplicate.
- Use sameAs() method of bitmap to compare all image files stored previously as png before saving.