[android-developers] Re: How To Programmatically Turn On/Off WIFI?
good point!!! On 9月19日, 上午1时50分, Marco Nelissen marc...@android.com wrote: Sure you can, you just need a phone. On Fri, Sep 18, 2009 at 9:21 PM, !oEL runzhou...@gmail.com wrote: So there is no way I can really test it? On 9月18日, 下午1时07分, Roman ( T-Mobile USA) roman.baumgaert...@t- mobile.com wrote: You don't have Wifi support on the emulator -- 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 represent those of T-Mobile USA, Inc. On Sep 17, 9:48 pm, !oEL runzhou...@gmail.com wrote: Thank you guys. I got rid of the Security Exceptions by adding a couple of permissions, including WAKE_LOCK, which appears to be the exception I got after adding the two WIFI ones. However, now I've managed to actually access the state, but in Emulator it tells me: Failed to load WIFI driver. The same thing happens when I use the built-in power control widget. On Sep 17, 12:48 am, Raphael r...@android.com wrote: On Tue, Sep 15, 2009 at 8:36 PM, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do Iprogrammaticallyturn on/off WIFI? There's an example at line 226 here: http://code.google.com/p/autosettings/source/browse/trunk/AutoSetting... R/ --~--~-~--~~~---~--~~ 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How To Programmatically Turn On/Off WIFI?
Tell the Android team to add Wifi support in the emulator ... -- 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 represent those of T-Mobile USA, Inc. On Sep 18, 9:21 pm, !oEL runzhou...@gmail.com wrote: So there is no way I can really test it? On 9月18日, 下午1时07分, Roman ( T-Mobile USA) roman.baumgaert...@t- mobile.com wrote: You don't have Wifi support on the emulator -- 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 represent those of T-Mobile USA, Inc. On Sep 17, 9:48 pm, !oEL runzhou...@gmail.com wrote: Thank you guys. I got rid of the Security Exceptions by adding a couple of permissions, including WAKE_LOCK, which appears to be the exception I got after adding the two WIFI ones. However, now I've managed to actually access the state, but in Emulator it tells me: Failed to load WIFI driver. The same thing happens when I use the built-in power control widget. On Sep 17, 12:48 am, Raphael r...@android.com wrote: On Tue, Sep 15, 2009 at 8:36 PM, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do Iprogrammaticallyturn on/off WIFI? There's an example at line 226 here: http://code.google.com/p/autosettings/source/browse/trunk/AutoSetting... R/ --~--~-~--~~~---~--~~ 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How To Programmatically Turn On/Off WIFI?
You don't have Wifi support on the emulator -- 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 represent those of T-Mobile USA, Inc. On Sep 17, 9:48 pm, !oEL runzhou...@gmail.com wrote: Thank you guys. I got rid of the Security Exceptions by adding a couple of permissions, including WAKE_LOCK, which appears to be the exception I got after adding the two WIFI ones. However, now I've managed to actually access the state, but in Emulator it tells me: Failed to load WIFI driver. The same thing happens when I use the built-in power control widget. On Sep 17, 12:48 am, Raphael r...@android.com wrote: On Tue, Sep 15, 2009 at 8:36 PM, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do I programmatically turn on/off WIFI? There's an example at line 226 here: http://code.google.com/p/autosettings/source/browse/trunk/AutoSetting... R/ --~--~-~--~~~---~--~~ 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How To Programmatically Turn On/Off WIFI?
So there is no way I can really test it? On 9月18日, 下午1时07分, Roman ( T-Mobile USA) roman.baumgaert...@t- mobile.com wrote: You don't have Wifi support on the emulator -- 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 represent those of T-Mobile USA, Inc. On Sep 17, 9:48 pm, !oEL runzhou...@gmail.com wrote: Thank you guys. I got rid of the Security Exceptions by adding a couple of permissions, including WAKE_LOCK, which appears to be the exception I got after adding the two WIFI ones. However, now I've managed to actually access the state, but in Emulator it tells me: Failed to load WIFI driver. The same thing happens when I use the built-in power control widget. On Sep 17, 12:48 am, Raphael r...@android.com wrote: On Tue, Sep 15, 2009 at 8:36 PM, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do Iprogrammaticallyturn on/off WIFI? There's an example at line 226 here: http://code.google.com/p/autosettings/source/browse/trunk/AutoSetting... R/ --~--~-~--~~~---~--~~ 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How To Programmatically Turn On/Off WIFI?
Sure you can, you just need a phone. On Fri, Sep 18, 2009 at 9:21 PM, !oEL runzhou...@gmail.com wrote: So there is no way I can really test it? On 9月18日, 下午1时07分, Roman ( T-Mobile USA) roman.baumgaert...@t- mobile.com wrote: You don't have Wifi support on the emulator -- 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 represent those of T-Mobile USA, Inc. On Sep 17, 9:48 pm, !oEL runzhou...@gmail.com wrote: Thank you guys. I got rid of the Security Exceptions by adding a couple of permissions, including WAKE_LOCK, which appears to be the exception I got after adding the two WIFI ones. However, now I've managed to actually access the state, but in Emulator it tells me: Failed to load WIFI driver. The same thing happens when I use the built-in power control widget. On Sep 17, 12:48 am, Raphael r...@android.com wrote: On Tue, Sep 15, 2009 at 8:36 PM, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do Iprogrammaticallyturn on/off WIFI? There's an example at line 226 here: http://code.google.com/p/autosettings/source/browse/trunk/AutoSetting... R/ --~--~-~--~~~---~--~~ 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How To Programmatically Turn On/Off WIFI?
Thank you guys. I got rid of the Security Exceptions by adding a couple of permissions, including WAKE_LOCK, which appears to be the exception I got after adding the two WIFI ones. However, now I've managed to actually access the state, but in Emulator it tells me: Failed to load WIFI driver. The same thing happens when I use the built-in power control widget. On Sep 17, 12:48 am, Raphael r...@android.com wrote: On Tue, Sep 15, 2009 at 8:36 PM, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do I programmatically turn on/off WIFI? There's an example at line 226 here: http://code.google.com/p/autosettings/source/browse/trunk/AutoSetting... R/ --~--~-~--~~~---~--~~ 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How To Programmatically Turn On/Off WIFI?
Add uses-permission android:name=android.permission.CHANGE_WIFI_STATE/ uses-permission uses-permission android:name=android.permission.ACCESS_WIFI_STATE/ uses-permission to the manifest file On Sep 16, 4:36 am, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do I programmatically turn on/off WIFI? Currently I'm having something like this: _iWifi.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE); if (!wm.isWifiEnabled()) { wm.setWifiEnabled(true); } else { wm.setWifiEnabled(false); } } }); Where _iWifi is a button instant (of course...) Now, the problem is that it tells me there is a Security Exception occurred, I guess I have no permission to access this. I'm sure a firmware key is not needed in this case (unlike my previous question regarding reboot action), so what is the proper way of doing this? Please help, thank you in advance :D --~--~-~--~~~---~--~~ 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How To Programmatically Turn On/Off WIFI?
Hi, Thank you for the help. However I'm still getting some Security Exception, will report later on the details. On Sep 16, 5:15 am, MrChaz mrchazmob...@googlemail.com wrote: Add uses-permission android:name=android.permission.CHANGE_WIFI_STATE/ uses-permission uses-permission android:name=android.permission.ACCESS_WIFI_STATE/ uses-permission to the manifest file On Sep 16, 4:36 am, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do I programmatically turn on/off WIFI? Currently I'm having something like this: _iWifi.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE); if (!wm.isWifiEnabled()) { wm.setWifiEnabled(true); } else { wm.setWifiEnabled(false); } } }); Where _iWifi is a button instant (of course...) Now, the problem is that it tells me there is a Security Exception occurred, I guess I have no permission to access this. I'm sure a firmware key is not needed in this case (unlike my previous question regarding reboot action), so what is the proper way of doing this? Please help, thank you in advance :D --~--~-~--~~~---~--~~ 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How To Programmatically Turn On/Off WIFI?
Could you post the Exceptions? What might help is a clean on your project. I got the following exception nor current process has android.permission.WAKE_LOCK and resolved it by cleaning the project/ -- 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 represent those of T-Mobile USA, Inc. On Sep 16, 11:02 am, !oEL runzhou...@gmail.com wrote: Hi, Thank you for the help. However I'm still getting some Security Exception, will report later on the details. On Sep 16, 5:15 am, MrChaz mrchazmob...@googlemail.com wrote: Add uses-permission android:name=android.permission.CHANGE_WIFI_STATE/ uses-permission uses-permission android:name=android.permission.ACCESS_WIFI_STATE/ uses-permission to the manifest file On Sep 16, 4:36 am, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do I programmatically turn on/off WIFI? Currently I'm having something like this: _iWifi.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE); if (!wm.isWifiEnabled()) { wm.setWifiEnabled(true); } else { wm.setWifiEnabled(false); } } }); Where _iWifi is a button instant (of course...) Now, the problem is that it tells me there is a Security Exception occurred, I guess I have no permission to access this. I'm sure a firmware key is not needed in this case (unlike my previous question regarding reboot action), so what is the proper way of doing this? Please help, thank you in advance :D --~--~-~--~~~---~--~~ 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How To Programmatically Turn On/Off WIFI?
On Tue, Sep 15, 2009 at 8:36 PM, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do I programmatically turn on/off WIFI? There's an example at line 226 here: http://code.google.com/p/autosettings/source/browse/trunk/AutoSettings/src/com/alfray/timeriffic/utils/SettingsHelper.java#226 R/ --~--~-~--~~~---~--~~ 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---