FileDocCategorySizeDatePackage
CameraButtonIntentReceiver.javaAPI DocAndroid 1.5 API1332Wed May 06 22:42:42 BST 2009com.android.camera

CameraButtonIntentReceiver

public class CameraButtonIntentReceiver extends android.content.BroadcastReceiver

Fields Summary
Constructors Summary
public CameraButtonIntentReceiver()

    
Methods Summary
public voidonReceive(android.content.Context context, android.content.Intent intent)

        KeyEvent event = (KeyEvent) intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
        
        if (event == null) {
            return;
        }
        
        Intent i = new Intent(Intent.ACTION_MAIN);
        i.setClass(context, Camera.class);
        i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(i);