What is the API call I need to make in Android 2.2 (Froyo) to create a Wifi hotspot (as seen in the Tethering and Portable Hotspot settings item).
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can call
private boolean setWifiApEnabled(WifiConfiguration wifiConfig, boolean enabled);using reflection 🙂
after getting the
WifiManageruse the reflection to get theWifiManagerdeclared methods, look for this method namesetWifiApEnabledand invoke it through theWifiManagerobjectThese API are marked as @hide, so currently you cannot use them directly, but they appear on the AIDL for the WifiManager so their are accessible!
An example can be:
It works but I cannot change the current configuration with my own, and getting the current WifiConfiguration of an active AP drive me to an empty configuration.Why?