Set Wi-Fi sleep policy to "Never"
On your Android phone:
For Android 2.3 and earlier
1) Navigate to Menu > Settings > Wireless & Networks > Wi-Fi settings> and select the menu button again.
2) You�ll be prompted to either scan or select advanced. Select �Advanced�
3) Select �Wifi sleep policy� , and you will have a couple of options to select from. Choose �Never�.
For Android 4.0 (Ice Cream Sandwich) and later:
1) Navigate to Menu > Settings > WiFi and select the menu button again.
2) Select Options, Advanced
3) Set �Keep WiFi on during sleep� to �Always�