# How to Connect ESP32 to Wi-Fi on Android (The Right Way) | EasyEsp

DevFeed: [How to Connect ESP32 to Wi-Fi on Android (The Right Way) | EasyEsp](<https://devfeed.tech/articles/how-to-connect-esp32-to-wi-fi-on-android-the-right-way-easyesp-121955.md>)

Original publisher: [Read original article](<https://proandroiddev.com/how-to-connect-esp32-to-wi-fi-on-android-the-right-way-easyesp-b110317a5a41?source=rss----c72404660798---4>)

Author: Arul mani

Published: 2026-11-06T15:14:25Z

Content type: tutorial

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [smartdevices](<https://devfeed.tech/topics/smartdevices.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [automated](<https://devfeed.tech/tags/automated.md>), [build](<https://devfeed.tech/tags/build.md>), [esp32](<https://devfeed.tech/tags/esp32.md>), [firmware](<https://devfeed.tech/tags/firmware.md>), [flow](<https://devfeed.tech/tags/flow.md>), [hotspot](<https://devfeed.tech/tags/hotspot.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [http](<https://devfeed.tech/tags/http.md>), [iot](<https://devfeed.tech/tags/iot.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kmm](<https://devfeed.tech/tags/kmm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [ktor](<https://devfeed.tech/tags/ktor.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [network](<https://devfeed.tech/tags/network.md>), [networking](<https://devfeed.tech/tags/networking.md>), [wi-fi](<https://devfeed.tech/tags/wi-fi.md>)

## AI overview

EasyESP Connect is presented as a way to provision an ESP32 from an Android app without sending users through phone Wi-Fi settings. The excerpt says Android 9+ may route requests from an internet-free ESP32 hotspot over cellular; on Android 10+, the library uses WifiNetworkSpecifier and binds the app process to that Wi-Fi network. It can discover setup SSIDs, fall back to guided manual connection if automatic connection is blocked, and pair with ESP32 firmware in WIFI_AP_STA mode. Developers can use a prebuilt Jetpack Compose UI, launch the flow through Activity Result API from XML or Fragment apps, or build a custom UI around its MVI session and state. The Arduino library exposes GET /networks for nearby networks and POST /credentials to receive Wi-Fi details, stop the temporary hotspot, and connect to the home router.

## Source excerpt

Photo by Vishnu Mohanan on Unsplash Stop frustrating your IoT users. Build a seamless ESP32 Wi-Fi provisioning flow using Jetpack Compose, Ktor, and MVI Architecture. The Painless Way to Connect ESP32 Devices to Wi-Fi on Android 📱⚡ How to build seamless IoT provisioning flows using Jetpack Compose, Ktor, and MVI Architecture. If you've ever built an IoT product, you know the biggest hurdle isn't writing the firmware or building the cloud backend -- it's the onboarding process. Getting a screenless microcontroller (like an ESP32) connected to a user's home Wi-Fi network is notoriously frustrating. Users have to leave your app, go to their phone's Wi-Fi settings, connect to a temporary hotspot, ignore the "Internet may not be available" warnings, go back to the app, enter their credentials, and pray it works. As Android developers, we can do better. Today, I am open-sourcing EasyESP Connect -- a battle-tested Kotlin Multiplatform (KMM) Library, Android App, and companion ESP32 firmware that makes provisioning ESP32 devices incredibly simple, resilient, and fully automated. The Android IoT Routing Problem 🚧 Before diving into the solution, let's talk about why Android makes IoT provisioning so hard. When your phone connects to an ESP32's temporary Wi-Fi hotspot, that hotspot doesn't have internet access. Modern Android versions (Android 9+) are smart -- if they detect a Wi-Fi network has no internet, they will silently route all HTTP requests through the user's Cellular Data instead. This means when your app tries to send the Wi-Fi password to http://192.168.4.1, the request goes to the cellular tower, times out, and the setup fails. The Solution: EasyESP Connect ✨ EasyESP Connect solves this (and many other edge cases) by taking full control of the Android Networking stack and providing a beautiful, state-driven Jetpack Compose UI. Key Features: * Automated Device Discovery: Passively scans for local ESP32 devices broadcasting setup SSIDs using Android's WifiManager. * P