To open the WI-FI settings the code is:
startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
To open the WI-FI Direct settings the code is ?
Here's the manifest for that activity on KitKat,
<activity android:name="Settings$WifiP2pSettingsActivity"
android:taskAffinity="com.android.settings"
android:parentActivityName="Settings$WifiSettingsActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.VOICE_LAUNCH" />
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.wifi.p2p.WifiP2pSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
android:resource="@id/wireless_settings" />
</activity>
So it doesn't look like they exposed an explicit intent. You may be able to start it via ComponentName
but the name is not guaranteed to be the same across Android releases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With