title: Direct download and install of a android apk
body: <p>I developed a android app which is not in the playstore because its just for internal use.
  So i made a download page where the user can download the apk.
  The problem is, after download, the user is not able to install the apk.</p>
  
  <p>Its just possible if the user uses for example "Astro Filemanager".
  But i found the download page from the amazon app store apk:
  <a href="https://www.amazon.de/gp/mas/get/android/ref=mas_rw_ldg" rel="nofollow">https://www.amazon.de/gp/mas/get/android/ref=mas_rw_ldg</a>
  and if i download the apk i can install it directly with a click in the download notification.</p>
  
  <p>So i tried the find out what the differences between my apk and the amazon apk is.
  So i used "aapt dumb badging {pathToAPK}" to check the 2 files. </p>
  
  <p>The Amazon File:</p>
  
  <pre><code>package: name='com.amazon.venezia' versionCode='638000510' versionName='release-8.0005.557.1C_638000510'
  sdkVersion:'8'
  targetSdkVersion:'17'
  uses-permission:'android.permission.GET_TASKS'
  uses-permission:'android.permission.READ_LOGS'
  uses-permission:'android.permission.INTERACT_ACROSS_USERS_FULL'
  uses-permission:'com.amazon.mas.client.GLOBAL_BROADCAST'
  uses-permission:'android.permission.INSTALL_PACKAGES'
  uses-permission:'android.permission.DELETE_PACKAGES'
  uses-permission:'com.android.amazon.dcp.ota.permission.INSTALL_PACKAGES'
  uses-permission:'com.amazon.mas.client.install.CONTENT_PROVIDER_WRITE'
  uses-permission:'com.amazon.mas.client.install.INSTALL'
  uses-permission:'com.amazon.mas.client.install.KICKOFF_INSTALL'
  uses-permission:'com.amazon.mas.client.install.RECEIVE_INSTALL_STATE'
  uses-permission:'android.permission.INTERNET'
  uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'
  uses-permission:'android.permission.ACCESS_NETWORK_STATE'
  uses-permission:'android.permission.WAKE_LOCK'
  uses-permission:'com.amazon.inapp.purchasing.Permission.NOTIFY'
  uses-permission:'com.amazon.device.iap.physical.Permission.NOTIFY'
  uses-permission:'com.amazon.mas.client.authentication.permission.DEREGISTRATION_BROADCAST_PERMISSION'
  uses-permission:'com.amazon.mas.client.CONTENT_PROVIDER_READ'
  uses-permission:'com.amazon.mas.client.malware.blockedapp.BLOCKED_APP_PROVIDER_WRITE'
  application-label:'Appstore'
  application-label-ja:'Apps'
  application-label-de:'App-Shop'
  application-label-zh:'亚马逊应用商店'
  application-label-en:'Appstore'
  application-label-fr:'App-Shop'
  application-label-es:'Tienda Apps'
  application-label-it:'App-Shop'
  application-label-pt:'Appstore'
  application-label-fr_CA:'Appstore'
  application-icon-120:'res/drawable-ldpi/icon.png'
  application-icon-160:'res/drawable-mdpi/icon.png'
  application-icon-240:'res/drawable-hdpi/icon.png'
  application-icon-320:'res/drawable-xhdpi/icon.png'
  application-icon-480:'res/drawable-xhdpi/icon.png'
  application: label='Appstore' icon='res/drawable-mdpi/icon.png'
  launchable-activity: name='com.amazon.venezia.Venezia'  label='' icon=''
  uses-library-not-required:'com.amazon.webview'
  uses-library-not-required:'com.amazon.dcp.contracts'
  uses-library-not-required:'com.amazon.dcp.contracts.framework'
  uses-library-not-required:'com.amazon.client.metrics.api'
  uses-permission:'com.amazon.dcp.metrics.permission.METRICS_PERMISSION'
  uses-permission:'com.amazon.dcp.config.permission.DYN_CONFIG_VALUES_UPDATED'
  uses-permission:'com.amazon.dcp.settings.permission.READ_SETTINGS'
  uses-permission:'android.permission.GET_ACCOUNTS'
  uses-permission:'android.permission.USE_CREDENTIALS'
  uses-permission:'android.permission.MANAGE_ACCOUNTS'
  uses-permission:'android.permission.AUTHENTICATE_ACCOUNTS'
  uses-permission:'com.amazon.identity.auth.device.perm.AUTH_SDK'
  uses-permission:'com.amazon.identity.permission.GENERIC_IPC'
  uses-permission:'com.amazon.dcp.sso.permission.USE_DEVICE_CREDENTIALS'
  uses-permission:'com.amazon.dcp.sso.permission.EXPIRE_ACCESS_TOKEN'
  uses-permission:'com.amazon.dcp.sso.permission.account.changed'
  uses-permission:'com.amazon.dcp.sso.permission.MANAGE_COR_PFM'
  uses-permission:'com.amazon.dcp.sso.permission.CUSTOMER_ATTRIBUTE_SERVICE'
  uses-permission:'com.amazon.identity.permission.CAN_CALL_MAP_INFORMATION_PROVIDER'
  uses-permission:'amazon.permission.COLLECT_METRICS'
  uses-permission:'android.permission.ACCESS_WIFI_STATE'
  uses-permission:'android.permission.READ_EXTERNAL_STORAGE'
  uses-implied-permission:'android.permission.READ_EXTERNAL_STORAGE','requested WRITE_EXTERNAL_STORAGE'
  uses-feature:'android.hardware.wifi'
  uses-implied-feature:'android.hardware.wifi','requested android.permission.ACCESS_WIFI_STATE, android.permission.CHANGE_WIFI_STATE, or android.permission.CHANGE_WIFI_MULTICAST_STATE permission'
  uses-feature:'android.hardware.touchscreen'
  uses-implied-feature:'android.hardware.touchscreen','assumed you require a touch screen unless explicitly made optional'
  uses-feature:'android.hardware.screen.portrait'
  uses-implied-feature:'android.hardware.screen.portrait','one or more activities have specified a portrait orientation'
  main
  other-activities
  other-receivers
  other-services
  supports-screens: 'small' 'normal' 'large' 'xlarge'
  supports-any-density: 'true'
  locales: '--_--' 'ja' 'de' 'zh' 'en' 'fr' 'es' 'it' 'pt' 'fr_CA'
  densities: '120' '160' '240' '320' '480'
  native-code: 'armeabi'
  </code></pre>
  
  <p>And my File:</p>
  
  <pre><code>package: name='mypackage' versionCode='41' versionName='5.1'
  sdkVersion:'8'
  targetSdkVersion:'17'
  uses-permission:'android.permission.INTERNET'
  uses-permission:'android.permission.READ_PHONE_STATE'
  uses-permission:'android.permission.ACCESS_NETWORK_STATE'
  uses-permission:'android.permission.GET_ACCOUNTS'
  uses-permission:'android.permission.READ_CONTACTS'
  uses-permission:'android.permission.ACCESS_FINE_LOCATION'
  uses-permission:'com.google.android.c2dm.permission.RECEIVE'
  uses-permission:'mypackage.permission.C2D_MESSAGE'
  application-label:'Just for fun'
  application-label-da:'Just for fun'
  application-label-nb:'Just for fun'
  application-label-de:'Just for fun'
  application-label-he:'Just for fun'
  application-label-se:'Just for fun'
  application-label-fi:'Just for fun'
  application-label-en:'Just for fun'
  application-label-fr:'Just for fun'
  application-label-es:'Just for fun'
  application-label-it:'Just for fun'
  application-label-pt:'Just for fun'
  application-label-iw:'Just for fun'
  application-icon-120:'res/drawable-ldpi/icon_android.png'
  application-icon-160:'res/drawable/icon_android.png'
  application-icon-240:'res/drawable/icon_android.png'
  application-icon-320:'res/drawable/icon_android.png'
  application: label='Just for fun' icon='res/drawable/icon_android.png'
  launchable-activity: name='mypackage.MainActivity'  label='Just for fun' icon=''
  uses-feature:'android.hardware.location'
  uses-implied-feature:'android.hardware.location','requested a location access permission'
  uses-feature:'android.hardware.location.gps'
  uses-implied-feature:'android.hardware.location.gps','requested android.permission.ACCESS_FINE_LOCATION permission'
  uses-feature:'android.hardware.touchscreen'
  uses-implied-feature:'android.hardware.touchscreen','assumed you require a touch screen unless explicitly made optional'
  uses-feature:'android.hardware.screen.portrait'
  uses-implied-feature:'android.hardware.screen.portrait','one or more activities have specified a portrait orientation'
  main
  other-activities
  other-receivers
  supports-screens: 'small' 'normal' 'large' 'xlarge'
  supports-any-density: 'true'
  locales: '--_--' 'da' 'nb' 'de' 'he' 'se' 'fi' 'en' 'fr' 'es' 'it' 'pt' 'iw'
  densities: '120' '160' '240' '320'
  </code></pre>
  
  <p>But i have no idea was the difference is. My file is signed with our key. </p>