Skip to content
forked from Tencent/Shadow

零反射全动态Android插件框架

License

Notifications You must be signed in to change notification settings

ckrgithub/Shadow

 
 

Repository files navigation

Shadow

检查AndroidP是否有非sdk的隐藏api调用

private static void detectNonSdkApiUsageOnAndroidP(){
  if(Build.VERSION.SDK_INT<Build.VERSION_CODES.P){
    return;
  }
  StrictMode.VmPolicy.Builder builder=new StrictMode.VmPolicy.Builder();
  builder.penaltyDeath();
  builder.detectNonSdkApiUsage();
  StrictMode.setVmPolicy(build.build());
}

io流工具类:common-io

启动插件

Intent intent=new Intent(MainActivity.this,PluginLoadActivity.class);
intent.putExtra(Constant.KEY_ACTIVITY_CLASSNAME,"com.tencent.shadow.sample.plugin.app.lib.gallery.splash.SplashActivity");
startActivity(intent);

About

零反射全动态Android插件框架

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 78.7%
  • Kotlin 21.1%
  • Other 0.2%