storage - How to get notified of updates on the Android filesystem? -


specifically looking way update current view of app (which displays media files) based on whether new files added or deleted in background, or when app in paused state.

the way know of query mediastore , check count of returned tuples, , recreate whole view if counts different. ofcourse has caveats.

is there way can establish call-back when type of files written or removed directory ?

tia

on linux, people use inotify achieve goal,

and in android, can use fileobserver:

see ref here:

http://www.roman10.net/android-fileobserverthe-underlying-inotify-mechanism-and-an-example/

android file system hooks


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -