Reputation: 61
I don't have a dedicated button in Nexus1.I want to detect whether an image/video is captured from the camera like if anyone captures an image then it should write to file that image has been captured.
Upvotes: 2
Views: 1186
Reputation: 2741
You can use BraodcastReceiver:
<receiver android:name="NewPhotoReceiver">
<intent-filter>
<action android:name="com.android.camera.NEW_PICTURE"/>
<data android:mimeType="image/*"/>
</intent-filter>
</receiver>
Upvotes: 4