I donβt understand why I need to add the WAKE_LOCK permission to the application manifest when I switch wifi using setWifiEnabled ... Any idea?
Just guessing, but I would have imagined it, because Wi-Fi is rather hungry, and hacking blocking is an Android mechanism that helps the system control when applications use power. From http://pdk.android.com/online-pdk/guide/power_management.html :
A locked wakelock, depending on its type, prevents the system from entering a standby state or other low power states.