how I can detect if the device has a camera before calling the method camera.showDialog ();?
I think you're looking for the SystemState.CameraPresent property.
Microsoft.WindowsMobile.Status.SystemState.CameraPresent