Running mode

Hi,
Is there a way to distinguish between app running under emulator or real device from within a code?