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

上一篇 Android组件化开发+自定义路由框架
下一篇 Android USB通信入门篇
目录
文章列表
1 隐藏Nginx版本号的方法
隐藏Nginx版本号的方法
2
使用pm2部署vue项目
使用pm2部署vue项目
3
RocketMQ延时消息
RocketMQ延时消息
4
Appium运行报错:does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package
Appium运行报错:does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package
5
DDL与DML的区别
DDL与DML的区别
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。