I don't know if this would help you, but one way is to read the number
of sensors 
http://code.google.com/android/reference/android/hardware/SensorManager.html#getSensors()
. This is 0 on the emulator, and should be some number >0 on a real
device, provided that the device has sensors (which the G1 will have
at least).

By "name" of the device, do you mean its IMEI?
http://code.google.com/android/reference/android/telephony/TelephonyManager.html#getDeviceId()

Peli

On Sep 30, 4:14 pm, MrSnowflake <[EMAIL PROTECTED]> wrote:
> Is there a way to detect wether a activity is running on the emulator
> or on a real device? And if so, can we detect what the name of the
> device is?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to