Smarter Wi-Fi for Smartphones