title: How to Open Android System Settings from Unity Android App
body: <p>I am trying to open the System Settings from my Unity Android app, but I am receiving the following error:</p>
  
  <blockquote>
    <p>UnityEngine.AndroidJavaException:
    android.content.ActivityNotFoundException: No Activity found to handle
    Intent {act =android.settings.ACTION_SETTINGS
    cat=[android.intent.category.DEFAULT] dat=package:com.xxx.xxxxx
    flg=0x10000000}</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre class="lang-cs prettyprint-override"><code>try
  {
      using (var unityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
      using (AndroidJavaObject currentActivityObject = unityClass.GetStatic&lt;AndroidJavaObject&gt;("currentActivity"))
      {
          string packageName = currentActivityObject.Call&lt;string&gt;("getPackageName");
  
          using (var uriClass = new AndroidJavaClass("android.net.Uri"))
          using (AndroidJavaObject uriObject = uriClass.CallStatic&lt;AndroidJavaObject&gt;("fromParts", "package", packageName, null))
          using (var intentObject = new AndroidJavaObject("android.content.Intent", "android.settings.ACTION_SETTINGS", uriObject))
          {
              intentObject.Call&lt;AndroidJavaObject&gt;("addCategory", "android.intent.category.DEFAULT");
              intentObject.Call&lt;AndroidJavaObject&gt;("setFlags", 0x10000000);
              currentActivityObject.Call("startActivity", intentObject);
          }
      }
  }
  catch (Exception e)
  {
      Debug.Log(e);
  }
  </code></pre>