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 ~~