Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where is android.camera.NEW_PICTURE defined?

Tags:

android

camera

I used com.android.camera.NEW_PICTURE to check whether an image is captured or not.

(receiver android:name="NewPhotoReceiver")
    (intent-filter)

            (action android:name="com.android.camera.NEW_PICTURE"/)

            (data android:mimeType="image/*"/)

    (/intent-filter)
(/receiver)

But com.android.camera.NEW_PICTURE is not discussed any where in android developers site.

like image 852
surath Avatar asked Dec 29 '22 14:12

surath


1 Answers

In API 14 (ICS) and above, you can use the action "android.hardware.action.NEW_PICTURE", which is referenced here:

http://developer.android.com/reference/android/hardware/Camera.html#ACTION_NEW_PICTURE

So I guess specifying both of them together should cover both past & future usage:

<intent-filter>
    <action android:name="com.android.camera.NEW_PICTURE" />
    <action android:name="android.hardware.action.NEW_PICTURE" />
    <data android:mimeType="image/*" />
</intent-filter>

And the only question left is whether any OEM doen't broadcast "com.android.camera.NEW_PICTURE" on a pre-ICS Android...

like image 158
dab Avatar answered Jan 10 '23 07:01

dab