1

I have developed an app for Android 1.5.

I used the method: android.content.pm.PackageManager.installPackage(..) successfully.

Now I need to use the same app for Android ver 2.1 but for my luckless the method has removed.

anyone know about replecment for this method? (I am aware to the fact which I must have system permissions in order to use it)

thanks,

ray.

just to make it clear: I am looking for silent way of installing the activity as We did in ver 1.5. we are the phone manufactures(thats why we have specially phone permissions) and we need to ability to do installation without the users involvement. we developed some service for our customers, but now with ver 2.1 we cant help them.

rayman
  • 20,786
  • 45
  • 148
  • 246

2 Answers2

2

This was deemed a security risk, and I'm pretty sure it was never a public API. The only way third party software should be installing applications is by launching the built-in app installer activity.

Start an activity with the Intent.ACTION_PACKAGE_INSTALL action, with data URI pointing to an .apk

Mike dg
  • 4,648
  • 2
  • 27
  • 26
  • In this way You cant use a silent installation, I mean you must have the user involvement right? – rayman Feb 28 '11 at 15:11
  • installing requires the proper permission, which in turns requires proper signature. On the other hand, Intent.ACTION_PACKAGE_INSTALL _is_ deprecated. – njzk2 Jan 02 '12 at 16:13
2

I think the correct way to install apk from your application is via Activity. Android: install .apk programmatically check this for more details.

Community
  • 1
  • 1
Mojo Risin
  • 8,136
  • 5
  • 45
  • 58
  • I know it is. but I am looking for silent way of installing the activity as We did in ver 1.5. we are the phone manufactures and we need to ability to do installation without the users involvement. we developed a service for our customers to do silent installations without their involvement, but now with ver 2.1 we cant help them. – rayman Feb 28 '11 at 15:14
  • Yes you can't install third party apk in silent way due to security reasons. – Mojo Risin Feb 28 '11 at 15:18
  • Are you sure there isnt a replacement method in a hidden API instead of the old one? you can be sure with that? thanks. – rayman Feb 28 '11 at 15:27
  • 1
    http://groups.google.com/group/android-developers/browse_thread/thread/fe47bc6c72914df0 if you haven't read it already – Mojo Risin Feb 28 '11 at 15:35
  • Yes but they talk about Android 1.5 and that it's not possible. it is possible for us(the manufactures) I have already achieved that with 1.5. just trying to look which method I have to use with Android2.1 to get the same target. – rayman Feb 28 '11 at 16:19