Hmm, I looked into this once.
The easiest way is to take some standard keycode for Android that is not being used, like KEYCODE_CAMERA.
That will generate an intent for the camera.
You can just patch the AndroidManifest.xml in your app to handle the camera intent.
The other way, of course, is to patch the Android system itself.