Deviceadmininfo class added in Android 2.2

Source: Internet
Author: User

Android 2.2 adds an android. app. admin. the deviceadmininfo class can help us obtain a package information with the Administrator permission. The deviceadmininfo class has a constructor called deviceadmininfo (context, resolveinfo receiver) to instantiate this class. The parameter is the context of the target packagemanager.
Activityinfo getactivityinfo () obtains the activity information of the context and returns an activityinfo object.
Componentname getcomponent () // obtain the component name of the package
String getpackagename () // obtain the package name of the APK package
String getreceivername () // returns the names of all schedulers.
String gettagforpolicy (INT policyident) // return some defined tags. Here we define uses_policy_force_lock, uses_policy_limit_password, uses_policy_reset_password, expiration, and uses_policy_wipe_data.
Charsequence loaddescription (packagemanager pm) // load the description of a package
Drawable loadicon (packagemanager pm) // here, android123 prompts the recommended method for obtaining the icon in APK file 2.2.
Charsequence loadlabel (packagemanager pm) // obtain the software name
Boolean usespolicy (INT policyident) // for parameter definitions, refer to gettagforpolicy
This article is transferred from Www.35java.com

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.