title: Your account admin has placed restrictions on sending files of certain types android While updating application from my server
body: <p>I have an application in which I have in app updating. I download APK file from the server using FTP connection and use </p>
  
  <pre><code>File destination = new File(
                      Environment.getExternalStorageDirectory() ,"test-1.apk");
  
              Intent intent = new Intent(Intent.ACTION_VIEW);
              Uri uri = FileProvider.getUriForFile(MainActivity.this, BuildConfig.APPLICATION_ID + ".provider",destination);
  
              intent.setDataAndType(uri, "application/vnd.android.package-archive");
              intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
              intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
              startActivity(intent);
  </code></pre>
  
  <p>to install application.</p>
  
  <p>Permissions added:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/9HbHk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9HbHk.jpg" alt="Error"></a></p>
  
  <p>But on some devices I am getting this message. It works ok with most of the devices, so it might be the device specific issue. I would really appreciate any information regarding this.</p>