surath
surath

Reputation: 61

how to detect whether an image,video has been captured from phone camera of Nexus G1

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

Answers (1)

Damian Kołakowski
Damian Kołakowski

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

Related Questions