Added android permissions. Added code to read WiFi state and to detect sdcard directory