title: How to install applications programmatically without opening Play Store (as Google Drive does)
body: <p>Today the Google Drive app asked if I wanted to install the new apps Sheets &amp; Docs.</p>
  
  <p>I've accepted, expecting it to open Google Play Store so I could press install. </p>
  
  <p><strong>It didn't</strong>. It just showed me the popup with the permissions of each of the apps to confirm the installation, the same that appears when you press "Install" on any app on the Play Store.</p>
  
  <p>I was not aware this could be done. </p>
  
  <p>How can we reproduce this behavior in an app: have a button "Install App XPTO" which doesn't need to open Google Play Store? Just shows the permissions dialog and proceeds to install it via Play Store? </p>
  
  <hr>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>For those downvoting because they think this is the same as other questions... It's not! </p>
  
  <p><strong>In this case, the APK is not downloaded by Google Drive app and then installed. Google Drive "<em>tells</em>" Play Store to download &amp; install.</strong> </p>
  
  <p>That's the API that I'm interested.</p>
  
  <p>To support my case: after pressing <strong>INSIDE Google Drive to install the apps without opening Play Store, the download starts</strong>. During the download I've opened the Play Store to check and:</p>
  
  <p><img src="https://i.stack.imgur.com/8VY2n.jpg" alt="enter image description here"></p>
  
  <p>The screenshot proves that it isn't Google Drive downloading the APK and the installing it. It's the Play Store.</p>