int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
|
void | dump(Printer pw, String prefix) |
CharSequence |
loadDescription(PackageManager pm)
Retrieve the textual description of the application.
|
String |
toString()
Returns a string containing a concise, human-readable description of this object.
|
void | writeToParcel(Parcel dest, int parcelableFlags) |
From class android.content.pm.PackageItemInfo
|
public abstract class
PackageManager
extends Objectjava.lang.Object | |
↳ | android.content.pm.PackageManager |
Known Direct Subclasses |
abstract void |
addPackageToPreferred(String packageName)
This method is deprecated. This function no longer does anything; it was an old approach to managing preferred activities, which has been superceeded (and conflicts with) the modern activity-based preferences.
|
abstract boolean |
addPermission(PermissionInfo info)
Add a new dynamic permission to the system.
|
abstract boolean |
addPermissionAsync(PermissionInfo info)
Like
addPermission(PermissionInfo) but asynchronously persists the package manager state after returning from the call, allowing it to return quicker and batch a series of adds at the expense of no guarantee the added permission will be retained if the device is rebooted before it is written. |
abstract void |
addPreferredActivity(IntentFilter filter, int match, ComponentName[] set, ComponentName activity)
This method is deprecated. This is a protected API that should not have been available to third party applications. It is the platform's responsibility for assigning preferred activities and this can not be directly modified. Add a new preferred activity mapping to the system. This will be used to automatically select the given activity component when
Context.startActivity() finds multiple matching activities and also matches the given filter. |
abstract String[] |
canonicalToCurrentPackageNames(String[] names)
Map from a packages canonical name to the current name in use on the device.
|
abstract int |
checkPermission(String permName, String pkgName)
Check whether a particular package has been granted a particular permission.
|
abstract int |
checkSignatures(String pkg1, String pkg2)
Compare the signatures of two packages to determine if the same signature appears in both of them.
|
abstract int |
checkSignatures(int uid1, int uid2)
Like
checkSignatures(String, String) , but takes UIDs of the two packages to be checked. |
abstract void |
clearPackagePreferredActivities(String packageName)
Remove all preferred activity mappings, previously added with
addPreferredActivity(IntentFilter, int, ComponentName[], ComponentName) , from the system whose activities are implemented in the given package name. |
abstract String[] |
currentToCanonicalPackageNames(String[] names)
Map from the current package names in use on the device to whatever the current canonical name of that package is.
|
abstract Drawable |
getActivityIcon(Intent intent)
Retrieve the icon associated with an Intent.
|
abstract Drawable |
getActivityIcon(ComponentName activityName)
Retrieve the icon associated with an activity.
|
abstract ActivityInfo |
getActivityInfo(ComponentName className, int flags)
Retrieve all of the information we know about a particular activity class.
|
abstract List<PermissionGroupInfo> |
getAllPermissionGroups(int flags)
Retrieve all of the known permission groups in the system.
|
abstract int |
getApplicationEnabledSetting(String packageName)
Return the the enabled setting for an application.
|
abstract Drawable |
getApplicationIcon(String packageName)
Retrieve the icon associated with an application. 获取程序图标
|
abstract Drawable |
getApplicationIcon(ApplicationInfo info)
Retrieve the icon associated with an application.
|
abstract ApplicationInfo |
getApplicationInfo(String packageName, int flags)
Retrieve all of the information we know about a particular package/application.
|
abstract CharSequence |
getApplicationLabel(ApplicationInfo info)
Return the label to use for this application. 获取程序描述
|
abstract int |
getComponentEnabledSetting(ComponentName componentName)
Return the the enabled setting for a package component (activity, receiver, service, provider).
|
abstract Drawable |
getDefaultActivityIcon()
Return the generic icon for an activity that is used when no specific icon is defined.
|
abstract Drawable |
getDrawable(String packageName, int resid, ApplicationInfo appInfo)
Retrieve an image from a package.
|
abstract List<ApplicationInfo> |
getInstalledApplications(int flags)
Return a List of all application packages that are installed on the device. 获取所有已安装程序信息
|
abstract List<PackageInfo> |
getInstalledPackages(int flags)
Return a List of all packages that are installed on the device. 获取所有已安装 程序的包信息
|
abstract String |
getInstallerPackageName(String packageName)
Retrieve the package name of the application that installed a package.
|
abstract InstrumentationInfo |
getInstrumentationInfo(ComponentName className, int flags)
Retrieve all of the information we know about a particular instrumentation class.
|
abstract Intent |
getLaunchIntentForPackage(String packageName)
Return a "good" intent to launch a front-door activity in a package, for use for example to implement an "open" button when browsing through packages.
|
abstract String |
getNameForUid(int uid)
Retrieve the official name associated with a user id.
|
PackageInfo |
getPackageArchiveInfo(String archiveFilePath, int flags)
Retrieve overall information about an application package defined in a package archive file
|
abstract int[] |
getPackageGids(String packageName)
Return an array of all of the secondary group-ids that have been assigned to a package.
|
abstract PackageInfo |
getPackageInfo(String packageName, int flags)
Retrieve overall information about an application package that is installed on the system.
|
abstract String[] |
getPackagesForUid(int uid)
Retrieve the names of all packages that are associated with a particular user id.
|
abstract PermissionGroupInfo |
getPermissionGroupInfo(String name, int flags)
Retrieve all of the information we know about a particular group of permissions.
|
abstract PermissionInfo |
getPermissionInfo(String name, int flags)
Retrieve all of the information we know about a particular permission.
|
abstract int |
getPreferredActivities(List<IntentFilter> outFilters, List<ComponentName> outActivities, String packageName)
Retrieve all preferred activities, previously added with
addPreferredActivity(IntentFilter, int, ComponentName[], ComponentName) , that are currently registered with the system. |
abstract List<PackageInfo> |
getPreferredPackages(int flags)
Retrieve the list of all currently configured preferred packages.
|
abstract ActivityInfo |
getReceiverInfo(ComponentName className, int flags)
Retrieve all of the information we know about a particular receiver class.
|
abstract Resources |
getResourcesForActivity(ComponentName activityName)
Retrieve the resources associated with an activity.
|
abstract Resources |
getResourcesForApplication(ApplicationInfo app)
Retrieve the resources for an application.
|
abstract Resources |
getResourcesForApplication(String appPackageName)
Retrieve the resources associated with an application.
|
abstract ServiceInfo |
getServiceInfo(ComponentName className, int flags)
Retrieve all of the information we know about a particular service class.
|
abstract FeatureInfo[] |
getSystemAvailableFeatures()
Get a list of features that are available on the system.
|
abstract String[] |
getSystemSharedLibraryNames()
Get a list of shared libraries that are available on the system.
|
abstract CharSequence |
getText(String packageName, int resid, ApplicationInfo appInfo)
Retrieve text from a package.
|
abstract XmlResourceParser |
getXml(String packageName, int resid, ApplicationInfo appInfo)
Retrieve an XML file from a package.
|
abstract boolean |
hasSystemFeature(String name)
Check whether the given feature name is one of the available features as returned by
getSystemAvailableFeatures() . |
abstract boolean |
isSafeMode()
Return whether the device has been booted into safe mode.
|
abstract List<ResolveInfo> |
queryBroadcastReceivers(Intent intent, int flags)
Retrieve all receivers that can handle a broadcast of the given intent.
|
abstract List<ProviderInfo> |
queryContentProviders(String processName, int uid, int flags)
Retrieve content provider information.
|
abstract List<InstrumentationInfo> |
queryInstrumentation(String targetPackage, int flags)
Retrieve information about available instrumentation code.
|
abstract List<ResolveInfo> |
queryIntentActivities(Intent intent, int flags)
Retrieve all activities that can be performed for the given intent.
|
abstract List<ResolveInfo> |
queryIntentActivityOptions(ComponentName caller, Intent[] specifics, Intent intent, int flags)
Retrieve a set of activities that should be presented to the user as similar options.
|
abstract List<ResolveInfo> |
queryIntentServices(Intent intent, int flags)
Retrieve all services that can match the given intent.
|
abstract List<PermissionInfo> |
queryPermissionsByGroup(String group, int flags)
Query for all of the permissions associated with a particular group.
|
abstract void |
removePackageFromPreferred(String packageName)
This method is deprecated. This function no longer does anything; it was an old approach to managing preferred activities, which has been superceeded (and conflicts with) the modern activity-based preferences.
|
abstract void |
removePermission(String name)
Removes a permission that was previously added with
addPermission(PermissionInfo) . |
abstract ResolveInfo |
resolveActivity(Intent intent, int flags)
Determine the best action to perform for a given Intent.
|
abstract ProviderInfo |
resolveContentProvider(String name, int flags)
Find a single content provider by its base path name.
|
abstract ResolveInfo |
resolveService(Intent intent, int flags)
Determine the best service to handle for a given Intent.
|
abstract void |
setApplicationEnabledSetting(String packageName, int newState, int flags)
Set the enabled setting for an application This setting will override any enabled state which may have been set by the application in its manifest.
|
abstract void |
setComponentEnabledSetting(ComponentName componentName, int newState, int flags)
Set the enabled setting for a package component (activity, receiver, service, provider).
|
FROM:http://www.androidsnippets.org/snippets/70/
- class PInfo {
- private String appname = "";
- private String pname = "";
- private String versionName = "";
- private int versionCode = 0;
- private Drawable icon;
- private void prettyPrint() {
- log(appname + "\t" + pname + "\t" + versionName + "\t" + versionCode + "\t");
- }
- }
- private void listPackages() {
- ArrayList<PInfo> apps = getInstalledApps(false); /* false = no system packages */
- final int max = apps.size();
- for (int i=0; i<max; i++) {
- apps.get(i).prettyPrint();
- }
- }
- private ArrayList<PInfo> getInstalledApps(boolean getSysPackages) {
- ArrayList<PInfo> res = new ArrayList<PInfo>();
- List<PackageInfo> packs = getPackageManager().getInstalledPackages(0);
- for(int i=0;i<packs.size();i++) {
- PackageInfo p = packs.get(i);
- if ((!getSysPackages) && (p.versionName == null)) {
- continue ;
- }
- PInfo newInfo = new PInfo();
- newInfo.appname = p.applicationInfo.loadLabel(getPackageManager()).toString();
- newInfo.pname = p.packageName;
- newInfo.versionName = p.versionName;
- newInfo.versionCode = p.versionCode;
- newInfo.icon = p.applicationInfo.loadIcon(getPackageManager());
- res.add(newInfo);
- }
- return res;
- }
获取未安装的APK信息
- /** 获取未安装的APK信息
- * @param context
- * @param archiveFilePath APK文件的路径。如:/sdcard/download/XX.apk
- */
- public void getUninatllApkInfo(Context context, String archiveFilePath){
- PackageManager pm = context.getPackageManager();
- PackageInfo info = pm.getPackageArchiveInfo(archiveFilePath, PackageManager.GET_ACTIVITIES);
- if(info != null){
- ApplicationInfo appInfo = info.applicationInfo;
- String appName = pm.getApplicationLabel(appInfo).toString();
- String packageName = appInfo.packageName;
- Drawable icon = pm.getApplicationIcon(appInfo);
- }
- }
据测试:无法获取未安装APK的图片。
相关推荐
私信博主免费获取真题解析以及代码
Screenshot_2024-05-10-20-21-01-857_com.chaoxing.mobile.jpg
数字图像处理|Matlab-频域增强实验-彩色图像的频域滤波.zip
2024-2030中国定向转向膜市场现状研究分析与发展前景预测报告
开源工时填报管理系统安装包
电子元件 电子行业 行业分析 数据分析 数据报告 行业报告
Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。
18-17.网站域名DNS被劫持,网站服务器密码被改.mp4
QYResearch:2023年前五大2,3,3',4'-联苯四甲酸二酐(α-BPDA)企业占据全球91%的市场份额.docx
2024-2030中国仿生智能餐饮机器人市场现状研究分析与发展前景预测报告
82-82.渗透测试-CVE-2017-8464“震网三代 反弹shell演示课件.mp4
Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。
渗透测试渗透测试之SQL注入基于报错注入(下)
Android是一种基于Linux内核(不包含GNU组件)的自由及开放源代码的移动操作系统,主要应用于移动设备,如智能手机和平板电脑。该系统最初由安迪·鲁宾开发,后被Google公司收购并注资,随后与多家硬件制造商、软件开发商及电信营运商共同研发改良。 Android操作系统的特点包括: 开放源代码:Android系统采用开放源代码模式,允许开发者自由访问、修改和定制操作系统,这促进了技术的创新和发展,使得Android系统具有高度的灵活性和可定制性。 多任务处理:Android允许用户同时运行多个应用程序,并且可以轻松地在不同应用程序之间切换,提高了效率和便利性。 丰富的应用生态系统:Android系统拥有庞大的应用程序生态系统,用户可以从Google Play商店或其他第三方应用市场下载和安装各种各样的应用程序,满足各种需求。 可定制性:Android操作系统可以根据用户的个人喜好进行定制,用户可以更改主题、小部件和图标等,以使其界面更符合个人风格和偏好。 多种设备支持:Android操作系统可以运行在多种不同类型的设备上,包括手机、平板电脑、智能电视、汽车导航系统等。 此外,Android系统还有一些常见的问题,如应用崩溃、电池耗电过快、Wi-Fi连接问题、存储空间不足、更新问题等。针对这些问题,用户可以尝试一些基本的解决方法,如清除应用缓存和数据、降低屏幕亮度、关闭没有使用的连接和传感器、限制后台运行的应用、删除不需要的文件和应用等。 随着Android系统的不断发展,其功能和性能也在不断提升。例如,最新的Android版本引入了更多的安全性和隐私保护功能,以及更流畅的用户界面和更强大的性能。此外,Android系统也在不断探索新的应用场景,如智能家居、虚拟现实、人工智能等领域。 总之,Android系统是一种功能强大、灵活可定制、拥有丰富应用生态系统的移动操作系统,在全球范围内拥有广泛的用户基础。
Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。
46-46.渗透测试-Kali Linux安全渗透.mp4
电子元件 电子行业 行业分析 数据分析 数据报告 行业报告
Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。
【名企实践】华为如何打造高绩效团队glq.pptx
Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。