开发者

Broadcast Action: ACTION_CAMERA_BUTTTON

Is there any way after this action has been broadcast via a receiver to determine that开发者_Go百科 the action has finished? i.e the user has exit camera mode and is doing something else?


You can register a broadcast receiver to receive this intent.

Note however that this intent will be broadcasted every time the user pushes the camera button, and is thus not directly related to any specific "action" (e.g. taking a photo).

BroadcastReceiver myReceiver = new BroadcastReceiver() {     
    @Override     
    public void onReceive(Context context, Intent intent) {         
        // do whatever you want to do     
    } 
};

registerReceiver(myReceiver, new IntentFilter(Intent.ACTION_CAMERA_BUTTON)); 
unregisterReceiver(myReceiver); 


Is there any way after this action has been broadcast via a receiver to determine that the action has finished?

No. For starters, there may be no "action" to "finish", and there is no definition of "action".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜