Monitor screen shot event and notify to observers when screen shot is taken.
// 1. create a instance of [ScreenShotMonitor]
val screenShotMonitor = ScreenShotMonitor(context)
// 2.
// start observe screen shot event
screenShotMonitor.startObserve()
// stop observe screen shot event
screenShotMonitor.stopObserve()
// 3. register listener
screenShotMonitor.registerListener(l)Observe image media database change by ContentResolver, and check if the latest added image is a
screen shot image, by check the file's path whether contains screen shot related keyword.
| Device | API Level | Result |
|---|---|---|
| RedMi K40 Pro | 31 | Passed |
| XiaoMi Mi 8 | 29 | Passed |
| XiaoMi Mi 4 | 23 | Passed |
| Oppo R11s | 28 | Passed |
