Use internal (COM. Android. Internal) and hidden (@ hide) APIs-Part 5

Source: Internet
Author: User

Xirihanlin 2011.06.07

Original path: https://devmaze.wordpress.com/2011/01/19/using-com-android-internal-part-5-summary-and-example/

To be able to use internal and hidden APIs, You need:

1. Create a custom original-android.jar that contains all. class files

2. Create a custom Android platform to use original-android.jar

3. Modify the ADT plug-in to allow the com. Android. Internal Package (only for the internal API)

4. Create a new project and reference the custom Android platform (the example in this article)

In this article, I will show you how to use the internal and hidden APIs.

In addition, at the end of this article, I listed some custom Android platforms that contain internal and hidden APIs. I included them so that you might not want to spend too much time on this, but want to try something quickly.

Example

Create a new project and select 2.3.extender platform:

Below isCode:

This Code uses the internal API (powerprofile) and hidden API (iswifiapenabled ). I can compile and run the code without using reflection.

Custom Platform

I have created some platforms for myself. Copy them to the sdk_dir \ platforms folder. This only makes the hidden API available. For internal APIs, You need to modify your ADT plug-in.

API 3: http://www.megaupload.com /? D = s1f2mkyz

API 4: http://www.megaupload.com /? D = vuctri3y

API 7: http://www.megaupload.com /? D = 7 itnilbk

API 8: http://www.megaupload.com /? D = ext5fkkt

API 9: http://www.megaupload.com /? D = ext5fkkt

API 10: http://www.megaupload.com /? D = fcv78a9m

================== Gorgeous split line ================

I tried several of the custom platforms and found that internal and hidden APIs are actually available, but there are also some unexpected problems, such as alertdialog. the context parameter is redundant in builder (context ..

I didn't take the time to study why this happened. If any of my shoes knows why, tell me ~~

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.