Search code examples
androidandroid-wifi

Launch wifi setting activity in full screen


I need to create a project which needs to call android wifi setting screen . my project needs to run on full screen mode so this is my AndroidManifest.xml file .

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.fullscreenwifi"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="15" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

in Main activity i placed a button and this is my button onClick method

public void onClick(View v)
   startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
}

when i click on this button it launches wifi setting screen but this screen not launching with full screen mode . I am totally struck with this problem . Is there anyway to call this wifi setting screen along with full screen mode ? . Thanks in advance .


Solution

  • No, you can't force the settings app to launch in full screen mode through your code.

    The Settings app is an independent app, which has been designed to run without fullscreen. By using an Intent, you launch the Settings app. The user is no longer in your app, and hence you can't control the full screen state of the displayed activity.