seba123neo seba123neo - 1 month ago 12x
Android Question

Intent to open Wi-Fi Direct settings

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"
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.VOICE_LAUNCH" />
        <meta-data android:name=""
            android:value="" />
        <meta-data android:name=""
            android:resource="@id/wireless_settings" />

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.