title: How to get status enable or disable for auto start permission in android programatically
body: <p>I want to check the status of Auto Start permission in Vivo phone, I got solution to open that setting but I am not able to check status is on/off in permission Auto Start for my app. If it is enable then do not want to open that Auto Start setting.</p>
  
  <p>How can I solve this?</p>
  
  <p>Using below code I open Auto start setting.</p>
  
  <pre><code>    try {
          val intent = Intent()
          val manufacturer = Build.MANUFACTURER
          if ("xiaomi".equals(manufacturer, ignoreCase = true)) {
              intent.component = ComponentName("com.miui.securitycenter", "com.miui.permcenter.autostart.AutoStartManagementActivity")
          } else if ("oppo".equals(manufacturer, ignoreCase = true)) {
              intent.component = ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startup.StartupAppListActivity")
          } else if ("vivo".equals(manufacturer, ignoreCase = true)) {
              intent.component = ComponentName("com.vivo.permissionmanager", "com.vivo.permissionmanager.activity.BgStartUpManagerActivity")
          } else if ("Letv".equals(manufacturer, ignoreCase = true)) {
              intent.component = ComponentName("com.letv.android.letvsafe", "com.letv.android.letvsafe.AutobootManageActivity")
          } else if ("Honor".equals(manufacturer, ignoreCase = true)) {
              intent.component = ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.optimize.process.ProtectActivity")
          }
          val uri = Uri.fromParts("package", context.getPackageName(), null)
          intent.data = uri
          val list = context.packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY)
          if (list.size &gt; 0) {
              context.startActivity(intent)
          }
      } catch (e: Exception) {
          Log.e("exc", e.toString())
      }
  </code></pre>