Wednesday, January 27, 2010

[android-developers] Re: How to programmatically install an APK file ?

Hi,

Use this:

intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file:///
sdcard/.sampleapk"), "application/vnd.android.package-archive");
startActivity(intent);

Where Sample.apk is the apk you need to install.

On Jan 27, 1:54 pm, ColletJb <collet...@gmail.com> wrote:
> Hi,
>
> How can I programmatically install an apk file ?
>
> I've foud that the PackageManager.installPackage(...) method was used
> to do that, but is no longer supported (http://developer.android.com/
> sdk/api_diff/4/changes/android.content.pm.PackageManager.html)
>
> How can I do then ?
>
> Thanks for your help
>
> ColletJb

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate