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.
views:
55answers:
1
A:
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>
Damian Kołakowski
2010-06-10 06:38:22
thanks Damin.Your solution works like charm.But i searched for "com.android.camera.NEW_PICTURE" and it is not defined in android developers(http://developer.android.com/).can u give the reference of it.
surath
2010-06-10 08:48:49
Your welcome :) There is no documentation for the intent. I founded it here: http://android.git.kernel.org/?p=platform/packages/apps/Camera.git;a=blob;f=src/com/android/camera/Camera.java;h=ef99842136f5df362add5f07148ca6c8ff981a16;hb=1d4c75065966c4f6f56900e31f655bfd1b334435#l476
Damian Kołakowski
2010-06-10 13:07:50