views:

104

answers:

1

Is there any way to know if my application is running on the emulator or on the device ?

+3  A: 
Secure.getString(getContentResolver(), Secure.ANDROID_ID); 

(where Secure is android.provider.Settings.Secure)

That value will be null on the emulator, non-null on devices.

CommonsWare