Properly detect the type of device or presence of a camera

Now that the iPad 2 is on its way onto people’s hands, I’ve got a small dilemma with my new game, Rico: Mercenary for Hire (http://tinyurl.com/ricomfh):

I used this function in my game to determine what kind of device it’s being played on:
[lua]-- determine device type
function inferredDevice()
local x = display.contentScaleX
local y = display.contentScaleY
if x == 0.5 and y == 0.5 then return “iPhone 4”; end
if x == 1 and y == 1 then return “iPhone 3G/3GS”; end
if x == 0.46875 and y == 0.46875 then return “iPad”; end
return “unknown”;
end[/lua]

It works well to determine if I’m on a Retina Display device like the iPhone 4 and 4th-generation iPod touch, or if I’m pre-Retina Display, or on an iPad. And while those three distinctions are good for most purposes, the ability to detect whether or not the device has a camera remains impossible.

And now that the iPad 2 has a camera, I’m sure they’d want to take advantage of that feature in my game, if they know it’s available for iPhone and iPod touch users. (Speaking of which, I forgot the earliest iPod touches didn’t have a camera either!)

So, is there a surefire way to detect the type of device it is (even like how Apple differentiates like iPhone2,1, iPad1,1, etc.) and/or whether or not the device has zero, one, or two cameras, or just true or false?
[import]uid: 6084 topic_id: 7734 reply_id: 307734[/import]