14

I am trying to understand the Android PackageManager (functionality and uses) and the new improvements in Ice Cream Sandwich for PackageManager over previous versions.

I have seen the following links and some old threads but still would appreciate if someone can provide me with more references or an explanation as very little is available on the internet.

PackageManager Android docs

Wikipedia - Package Manager

EDIT:

I wanted to broaden my understanding about PackageManager in android.

  1. How it works with APK's (Set of checks and steps that it follows for installation, updating and deletion).

  2. Android Play market acts as a repository for data. The interaction of PackageManager with market for downloading and updating.

  3. Is the installation process for 3rd party apps different to Play market apps, when using PackageManager?

There is very little documentation available on android developer site for PackageManager and hence your help is really appreciated.

Thanks :)

Richard Le Mesurier
  • 29,432
  • 22
  • 140
  • 255
learner
  • 1,095
  • 2
  • 18
  • 41
  • I know this post is to old, but I have a similar requirement that is driving me to make research. I am posting some of the info I have at this place. Came across a link for installing market apps via package manager. Though, not personally tried it, I am posting it here hoping that it might help someone http://android.amberfog.com/?p=98 – varunrao321 Apr 27 '12 at 13:12
  • Please check below links... http://stackoverflow.com/questions/3661018/purpose-of-using-packagemanager-in-android also check how to use package manager http://stackoverflow.com/questions/2583966/how-do-i-use-packagemanager-addpreferredactivity Thanks – SBJ Dec 01 '11 at 14:14
  • Thanks for reply SBJ but I have already gone through these questions. Wanted to broaden my understanding about package manager in android. How it reacts to Apk's(Set of checks and steps that it follows for installation and updatation) – learner Dec 01 '11 at 19:57

1 Answers1

14

This is way to general. Generally, PackageManager provides methods for querying and manipulating installed packages and related permissions, etc. Some methods are only allowed to the system user. Changes to API in ICS are here.

Those are questions about the actual implementation, and Stack Overflow may not be the best place for those. In general, you should read the Android source to get the full picture. Briefly:

  1. Installed packages info is stored in an XML file: /data/system/packages.xml. PackageManager parses and modifies this when installing or removing packages.
  2. The way the Android Market works is generally undisclosed.
  3. See 2. Android does keep track how a package was installed, so the Market app can tell which apps were installed from the Market and check for updates.
Manaus
  • 407
  • 5
  • 9
Nikolay Elenkov
  • 52,576
  • 10
  • 84
  • 84
  • Thanks Nikolay. Link is useful :) I Wanted to broaden my understanding about package manager in android. 1) How it reacts to Apk's(Set of checks and steps that it follows for installation and updatation and deletion). 2) Also android market acts as a repositry for data. The interaction of PM with market for downloading and updation. 3) One more thing, third party apps installation by package manager is different from market apps or same? There is very less documentation available on android developer site for PM and hence your help is really appreciated. :) – learner Dec 01 '11 at 19:59