Reputation: 648
A User takes pictures using camera in his device. My application should keep track of how many photos captured by the user.
I don't want my application to launch any default camera. I want to get count incremented for clicked photos by the user with his device camera.
Since devices having soft button camera not works with CAMERA_BUTTON
intent, so is there any other way to get count.
Upvotes: 0
Views: 172
Reputation: 1006724
my application should keep track of how many photos captured by the user
In general, that is impossible. You have no ability to spy on arbitrary actions of other applications.
The closest thing is what julian suggested -- use a FileObserver
to monitor Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)
. However, not all camera applications will store their pictures there.
Upvotes: 1