[android-developers] Re: how to know if it the emulator or device

2009-11-04 Thread Diego Torres Milano
As Dianne mentioned assuming that because there's no wifi you are running on the emulator is a bit risky. There could be real phones with no wifi and emulator emulating wifi. Stick to any of the other methods. On Nov 4, 6:19 am, Zhihong GUO gzhh...@gmail.com wrote: It can not work. There is no

[android-developers] Re: how to know if it the emulator or device

2009-11-04 Thread Roman ( T-Mobile USA)
Yep, I agree that checking the Wifi service availability is not the best idea -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily

[android-developers] Re: how to know if it the emulator or device

2009-11-03 Thread Emmanuel
On Nov 3, 2:29 pm, Zhihong GUO gzhh...@gmail.com wrote: Hi all, How to know if the application is running on emulator or on a real device? I want to implement a function to detect wifi connection. If the application is running on emulator, just skip the wifi detection, while on real device,

[android-developers] Re: how to know if it the emulator or device

2009-11-03 Thread lianwei
if (1.equals(android.os.SystemProperties.get(ro.kernel.qemu))) { // Run in Emulator } On Nov 4, 9:21 am, Emmanuel emmanuel.ast...@gmail.com wrote: On Nov 3, 2:29 pm, Zhihong GUO gzhh...@gmail.com wrote: Hi all, How to know if the application is running on emulator or on a real device?

[android-developers] Re: how to know if it the emulator or device

2009-11-03 Thread Roman ( T-Mobile USA)
Furthermore the API call (WifiManager)mContext.getSystemService(mWifiService); gives you an exception on the Emulator which is an indication that Wifi radio is not supported. -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this

Re: [android-developers] Re: how to know if it the emulator or device

2009-11-03 Thread Dianne Hackborn
On Tue, Nov 3, 2009 at 11:10 AM, Roman ( T-Mobile USA) roman.baumgaert...@t-mobile.com wrote: Furthermore the API call (WifiManager)mContext.getSystemService(mWifiService); gives you an exception on the Emulator which is an indication that Wifi radio is not supported. That's only

Re: [android-developers] Re: how to know if it the emulator or device

2009-11-03 Thread Zhihong GUO
Hi lianwei, what's the means of ro.kernel.qemu? 2009/11/4 lianwei lianwei.w...@gmail.com if (1.equals(android.os.SystemProperties.get(ro.kernel.qemu))) { // Run in Emulator } On Nov 4, 9:21 am, Emmanuel emmanuel.ast...@gmail.com wrote: On Nov 3, 2:29 pm, Zhihong GUO

Re: [android-developers] Re: how to know if it the emulator or device

2009-11-03 Thread Zhihong GUO
It can not work. There is no exception throws and the wifiManager returned can be used as wifiManager.isEnabled() 2009/11/4 Dianne Hackborn hack...@android.com On Tue, Nov 3, 2009 at 11:10 AM, Roman ( T-Mobile USA) roman.baumgaert...@t-mobile.com wrote: Furthermore the API call