This is android app example to test android.os.FileObserver API in Java.
As official API reference document says, it requires android API 29(android OS version 10).
refer: https://developer.android.com/reference/android/os/FileObserver
- android studio to build apk from source, tested version: 2021.3.1.16.
- android terminal, OS version 10 and later to test, tested terminal: Google Pixel 3a
- tested java compiler version: openjdk-11-jdk
- build apk from source in android-studio
- run app from android-studio
- play app with camera app on your terminal.
press Start button on the app, then take photo, then press Stop button on the app.
- This app is a minimalist. :-)
- This app observes DCIM/Camera folder, as defined in source (MainActivity)
- This app has just simplest UI (AppCompatActivity) created from 'Empty Activity'
- This app has just two source file, MainActivity and MyFileObserver.
- MyFileObserver shows observed events in TextView area on the app.