Android中的软件包管理器 [英] Package Manager in Android

查看:106
本文介绍了Android中的软件包管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解Android PackageManager (功能和用途)以及与以前版本相比, PackageManager 的Ice Cream Sandwich的新改进.

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文档

维基百科-包管理器

我想扩大我对android中 PackageManager 的理解.

I wanted to broaden my understanding about PackageManager in android.

  1. 它如何与APK配合使用(安装,更新和删除操作遵循的一系列检查和步骤).

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

Android Play市场充当数据存储库. PackageManager 与下载和更新市场的互动.

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

使用 PackageManager 时,第三方应用程序的安装过程是否不同于Play市场应用程序?

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

Android开发者站点上关于 PackageManager 的文档很少,因此,非常感谢您的帮助.

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

谢谢:)

推荐答案

这是通用的方法.通常, PackageManager 提供查询和操纵已安装软件包以及相关权限等的方法.某些方法仅允许 system 用户使用.在此处.

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.

这些是关于实际实现的问题,而Stack Overflow可能不是最佳选择.通常,您应该阅读Android源代码以获取完整图片.简要地:

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. 已安装的软件包信息存储在XML文件中:/data/system/packages.xml . PackageManager 在安装或删除软件包时会对此进行解析和修改.
  2. 通常未公开Android Market的工作方式.
  3. 请参阅2.Android确实会跟踪软件包的安装方式,因此Market应用可以告诉您从Market安装了哪些应用并检查更新.
  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.

这篇关于Android中的软件包管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆