FreeReflection一个允许你在Android P上使用反射而没有任何限制的库

FreeReflection

FreeReflection is a library that lets you use reflection without any restriction above Android P (includes Q).

Github: https://github.com/tiann/FreeReflection/

Usage

  1. Add dependency to your project(jcenter):
implementation 'me.weishu:free_reflection:2.2.0'
  1. Add one line to your Application.attachBaseContext:
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    Reflection.unseal(base);
}

Then you can use the reflection API normally, all the restrictions are gone. Enjoy yourself 🙂

Under the hood

free reflection above android p

another way to use reflection api above android p

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/29/freereflection-is-a-library-that-allows-you-to-use-reflection-on-android-p-without-any-restrictions/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
FreeReflection一个允许你在Android P上使用反射而没有任何限制的库
FreeReflection FreeReflection is a library that lets you use reflection without any restriction above Android P (includes Q). Github: https://github……
<<上一篇
下一篇>>
文章目录
关闭
目 录