"Hardware Exists" Test?

Is there some convienience function / test to detect if a device has:

GPS?

ACCELEROMETER?

COMPASS?

GYROSCOPE?

For example, the GPS (location) and accelerometer displaches events and the docs say such events are displached only if the hardware exists (of course). If the event handler is coded but no events are dispatched (because the hardware doesn’t exist) how how would you even know it exists or not?

It would be nice if something like  system.getInfo( “compass” ) existed that would return true / false but since it doesn’t, how can each of these four hardware items be checked?

Thanks in advance!

Can you please add that feature request at http://feedback.coronalabs.com  That sounds like a very useful feature.  Hopefully there is a way to detect their presence.

Can you please add that feature request at http://feedback.coronalabs.com  That sounds like a very useful feature.  Hopefully there is a way to detect their presence.