Adding android.permission.INSTALL_PACKAGES to the manifest results in
the following:

10-05 18:50:45.631: WARN/PackageManager(57): Not granting permission
android.permission.INSTALL_PACKAGES to package com.test
(protectionLevel=2 flags=0x44)

Subsequently tried the following without any luck...

try {
   Intent myIntent = new Intent(
               Intent.ACTION_PACKAGE_INSTALL,
               Uri.parse("file://" +
apkFile.getAbsolutePath().toString());
   startActivity(myIntent);
} catch (Exception e) {
   Log.e(tag, e.getMessage();
}

Results in the following:

10-05 18:50:49.440: ERROR/APKInstaller(316): No Activity found to
handle Intent { action=android.intent.action.PACKAGE_INSTALL
data=file:///c:/test.apk }

I'm assuming the PackageManager and/or IPackageInstallObserver must
play a role somewhere in this process.

What exactly do you mean by "launch an intent to view it?"

Thx to anyone that can help clear this up.

- Nick

On Aug 26, 4:27 am, hackbod <[EMAIL PROTECTED]> wrote:
> You can download an apk and launch an intent to view it, allowing the
> user to install it, like the browser does.  You can't directly install
> an apk without the user being involved (and thus approving the
> action).
>
> On Aug 26, 1:26 am, Wesley <[EMAIL PROTECTED]> wrote:
>
> > hi,
>
> > oic
>
> > so this is means we cannot download the apk and install it or somehow delete
> > the package using our application???
>
> > :)
>
> > Wesley.
>
> > On Tue, Aug 26, 2008 at 3:36 PM, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > This is not available to applications, sorry.
>
> > > On Aug 26, 12:25 am, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
> > > > hi,
>
> > > > Does anyone successful use thePackageManager to install apk???
>
> > > > wesley.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to