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" <[email protected]> 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 <[email protected]> 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" <[email protected]> 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 [email protected] 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 -~----------~----~----~----~------~----~------~--~---

