title: How to set Default launcher from Setting programatically?
body: <p>I want to make my Launcher as Default Launcher. My code  is Working properly for many but not wok on LeTtv device.
  because it's provide set default launcher from default app setting.</p>
  
  <p>when run this code it's move on default Launcher but not show Launcher chooser Popup only in LeTv Device .</p>
  
  <p><strong>How to open Default app selection Setting?</strong></p>
  
  <p><strong>my Code for Choose default launcher</strong></p>
  
  <pre><code>private void setDefLauncher(Context c) {
  
  
  
      PackageManager p = c.getPackageManager();
      ComponentName cN = new ComponentName(c, FakeLauncher.class);
      p.setComponentEnabledSetting(cN,
              PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
              PackageManager.DONT_KILL_APP);
  
      Intent selector = new Intent(Intent.ACTION_MAIN);
      selector.addCategory(Intent.CATEGORY_HOME);
      c.startActivity(selector);
  
      p.setComponentEnabledSetting(cN,
              PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
              PackageManager.DONT_KILL_APP);
  }
  </code></pre>
  
  <p><strong>AndroidManifest.xml</strong></p>
  
  <pre><code>        &lt;activity
              android:name="com.android.launcher.launcher3.Launcher"
              android:clearTaskOnLaunch="true"
              android:enabled="true"
              android:excludeFromRecents="true"
              android:launchMode="singleTask"
              android:resumeWhilePausing="true"
              android:screenOrientation="nosensor"
              android:stateNotNeeded="true"
              android:taskAffinity=""
              android:theme="@style/Theme"
              android:windowSoftInputMode="adjustPan" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
                  &lt;category android:name="android.intent.category.HOME" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
                  &lt;category android:name="android.intent.category.MONKEY" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
    &lt;activity
              android:name="com.launcher2.activitys.FakeLauncher"
              android:enabled="false"
              android:excludeFromRecents="true" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.HOME" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  </code></pre>
  
  <p>Set Default Launcher manually
  <strong>Setting->Application Manager->Default App Setting->Set Launcher</strong>
  <a href="https://i.stack.imgur.com/gwjH2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gwjH2.jpg" alt="enter image description here"></a></p>