title: Equivalent to MANAGE_UNKNOWN_SOURCES_ACTIVITY in API 25 and Below
body: <p>My application is side-loaded and I'm implementing some functionality that will download and install an updated APK.</p>
  
  <p>In API 26 and above I can check whether the application has the relevant "Allow from this (unknown) source" permission. If the application doesn't have the permission, then the application can redirect the user to the relevant security setting and listen for the result before proceeding with the installation - as per the code below:</p>
  
  <pre><code>if(Build.VERSION.SDK_INT &gt;= 26 &amp;&amp; !getPackageManager().canRequestPackageInstalls())
  {
      Intent unknownSourcesIntent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES);
      unknownSourcesIntent.setData(Uri.parse("package:" + getPackageName()));
  
      startActivityForResult(unknownSourcesIntent, MANAGE_UNKNOWN_SOURCES_ACTIVITY);
  }
  </code></pre>
  
  <p>ACTION_MANAGE_UNKNOWN_APP_SOURCES was introduced in API 26. </p>
  
  <p>Is there anything similar I can do in API 25 and below? </p>
  
  <p>Currently, if the permission is not granted then Android prompts the user to Manage Unknown Sources, but if the user enables the relevant setting, my application does not receive the result in order to automatically launch the package installer for the updated APK.</p>