Thank you very much for your help.
This has not solved my chooser issue however, as I could only use
ACTION_VIEW due to my minapiversion (8).
I am using this now, which works perfectly from 2.2 - 4.0 (which are the
only ones I've tested).
Apparently I was mistaken about the location of the package installer:
Intent intent = new Intent();
Am Samstag, 13. Oktober 2012 20:16:42 UTC+2 schrieb Pascal Ehlert:
> Hey folks,
> I am working on a non-market application that is used within our company.
> It has an updater that downloads apks from a web server and is supposed to
> install them.
> When I use the following code (tested on Android 4.0) to open the apk, I
> am presented with a selection of applications that can handle the specific
> content type ("application/vnd.android.package-archive"), among them being
> Dropbox and others:
> Intent intent = new Intent();
> intent.setDataAndType(Uri.fromFile(newFile(path)), "application/vnd.android.package-archive"
> To simplify the process for my users, I would prefer to always open the
> apk with Package Manager, avoiding that selective step.
> I read about setComponent and setClass(Name), but all the examples I could
> find were about "target classes" within the own application's scope.
> When I try to use "com.google.android.content.pm.PackageManager" instead,
> it fails with an ActivityNotFoundException.
> Looking forward to any advice!
> Thanks a lot,