I'm making an application that works as an Recycle Bin.
What I've done till now.
- Service using fileobserver
- Watching full sdcard
- Copy / Move File Methods
- Copy Files / Detect File Operations in C++ (NDK). // Mostly in Deadlock Condition.
- After some Research I've found that inotify.h is used in cpp to detect file operation.
- i have written code to use inotify.h in my project.
Problems :
If i use android File Observer methods then i am getting notified after file deletion and getting FileNotFoundException.
If i use Native Code i mean CPP/NDK for this when i try to call native method my application just doesn't respond. it doesn't even give any error or anything just it seems like deadlock.
After so many tries i am not able to achieve anything. So if any linux-kernel or android expert can guide me for this application that would be great.
EDIT :
I have tried some methods for linux kernel and executed in ubuntu it works fine. But when i try to do the same to android it doesn't work.
- if i need to override delete method from linux kernel or in android then how can i do that?
If you want to see my function and other stuff. please help me out.