c# - There is a way to know when the user copy a photo to camera roll album by usb connection? -


i trying event when file added on "camera roll" album usb connection. thought in create task verify if "camera roll" album increasing or decreasing size. cost in performance. trying find event tells me when system file altered.

anyone can me?

winrt provides files , folders monitoring based on queries, alternative .net filesystemwatcher class, app needs subscribed on query's contentschanged event notified

 private void mainpage_onloaded(object sender, routedeventargs e)     {         var query = knownfolders.cameraroll.createfilequery();         query.contentschanged += querycontentschanged;          await query.getfilesasync();     }     void querycontentschanged(windows.storage.search.istoragequeryresultbase sender, object args)     {         // handler code     } 

update

the getfilesasync necessary trigger contentschanged event.


Comments