I'm working on a music app for android. I'm creating my own music database since the android Mediastore
doesn't have all the fields I need. I'm planning to update the database as soon as the Mediastore
changes since updating the database on every app launch makes the app very slow to start.
Is this the right approach? Also please guide me on how can I listen to changes in the Audio files data in Mediatore, regardless of whether my app is running or not.?
I've read this answer but it's applicable only when my app is running. How do I do this even when the app is not running? Also the answer is more than 3 years old so things might have changed. I believe I'll need to use BroadcastReceiver
but I'm not sure how to go about it. I'm using Realm for database.
Any pointers would be really helpful.