简体   繁体   English

BroadcastReceiver从摄像机捕获图像

[英]BroadcastReceiver to capture image from camera

I want a broadcastreceive that when the user take a picture on native camera I intercept this picture. 我希望广播接收到,当用户在本机相机上拍摄照片时,我会截取该照片。

With this code: 使用此代码:

<receiver android:name=".PictureReceiver" >
    <intent-filter android:priority="10000" >
        <action android:name="android.intent.action.CAMERA_BUTTON" />

        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</receiver>

When the user take a picture the PictureReceiver is activated but I dont know how or if is possible to get the picture taken 当用户拍照时,PictureReceiver已激活,但我不知道如何或是否有可能拍照

There is no broadcast action available to filter the action, when the user take a picture. 用户拍摄照片时,没有可用的广播操作来过滤该操作。

Check in the link http://developer.android.com/reference/android/content/Intent.html#ACTION_CAMERA_BUTTON , only "android.intent.action.CAMERA_BUTTON" is available to detect the "camera button" pressed. 检入链接http://developer.android.com/reference/android/content/Intent.html#ACTION_CAMERA_BUTTON ,只有“ android.intent.action.CAMERA_BUTTON”可用于检测按下的“相机按钮”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM