SwapnilD
SwapnilD

Reputation: 117

HotSpot (WiFi Access Point) in android

Can someone please help me in launching the activity for "WiFi Access Point". I am able to turn ON the hotspot from code but not able to fetch the name of the network or launch the required activity.

I have tried the following code:

Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setClassName("com.android.settings.wifi", "com.android.settings.wifi.WifiApDialog");
cxt.startActivity(intent);

Other than this I would also like to fetch HotSpot username & password. The app I am developing is more similar to FoxFi.

Upvotes: 1

Views: 1640

Answers (2)

NagarjunaReddy
NagarjunaReddy

Reputation: 8645

try like this this is working for me useing direct open your activity class

Activity.this.startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS));

Upvotes: 0

EvZ
EvZ

Reputation: 12179

As far as I know you have no any public intent for it.
But you can open the Wireless & Networks > More ... by using this intent:

android.provider.Settings.ACTION_WIRELESS_SETTINGS

Upvotes: 0

Related Questions