Sunday, April 24, 2016

Android SDK Add-On hidden class

Leave a Comment

I need to export a hidden class through a SDK Add-On in Android Lollipop. I'm able to export non-hidden classes. After unsuccessfully trying the "usual way" I thought the problem was due to the @hide tag. So I decided to try the "dirty" way of getting rid of the @hide keyword responsible to hide the class (even if that would obviously break compatibility with the standard API). After removing the @hide keyword and building the class with #include(BUILD_JAVA_LIBRARY) in Android.mk, the Java library Jar file is empty. So I have two questions:

  1. Why the Jar file is empty even if the DEX file includes the class?
  2. How do I achieve the same result without removing the @hide keyword?

Thank you.

Note: I have used these resources as references/documentation: http://elinux.org/images/5/5c/Build_and_Distributing_SDK_Add-Ons.pdf https://newcircle.com/s/post/1571/exploring_sdk_add_ons_for_android_devices_larry_schiefer_video

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment