tags:

views:

157

answers:

1

Hi ,

Is there a way to automatically trigger the installation process of a just downloaded apk ?

Currently after I download the package , nothing happens unless I click the package ,in which case the packege installer is launched !

The tomcat server from where I download the package has in the web.xml file the following :

    <mime-mapping>
        <extension>apk</extension>
        <mime-type>application/vnd.android.package-archive</mime-type>
    </mime-mapping>
+1  A: 

That is exactly as it should be. Your app can trigger download of an apk but to install it the user must be shown the permissions it requests and explicitly agree. You absolutely cannot 'automatically trigger the installation process'. Even if you are updating an already-installed app.

Jim Blackler
Yet I wonder how "android market" application achieves this : you select an application , it is downloaded and then automatically installed
rantravee
Even so , in order for the package installer to start the user has to click the newly downloaded package , isn't there a way to skip this "clicking" part ?
rantravee
"Yet I wonder how "android market" application achieves this : you select an application , it is downloaded and then automatically installed" ... OK we might be talking at cross-purposes then, because using the Market for me, user input is still required to agree to the installation terms. You would be able to implement something similar to Market, once users have enabled Non-Market APKs in their settings.
Jim Blackler
Pretty much that's what I desire . But I'm stuck on starting the installation after the download finishes , even if the I already got the user consent on installing the application . I'd like to click the install button , agree on the required permissions , and then have the application installed , using the package installer.
rantravee