Reputation: 1706
I want to develop an Android app which connects 2 people(who have this app) to each other. I want to use Wifi Hotspot
capability of Android devices for my purpose. I searched a lot but didn't find any useful documentation or guideline on "how to make a hotspot on one device and connect to that via another device".
any help will be appreciated :)
Upvotes: 0
Views: 1368
Reputation: 403
I've found a few resources, and all point to the same API the WifiManager and WifiConfiguration.
DISCLAIMER: I haven't tried those APIs myself.
Apparently there are some undocumented methods in this API that you need to get by Reflection, most important being the getWifiConfiguration from WifiManager. After retrieving the WifiConfiguration, you could probably tweak the configuration to your needs (e.g: change the SSID) and then call another undocumented API setWifiApEnabled from WifiManager (also aqcuired via reflection) passing your configuration to it.
Check those sources below.
I hope that helps :)
Upvotes: 2