DLIntent dlIntent,int requestCode){//内部调用,原生方式启动Activityif(mFrom==DLConstants.FROM_INTERNAL){dlIntent.setClassName(context,dlIntent.getPluginClass());performStartActivityForResult(context,dlIntent,requestCode);returnDLPluginManager.START_RESULT_SUCCESS;}//拿出Intent中的package...
packageInfo被PackageManager解析后的插件信息。 这些信息都会在DLPluginManager#loadApk(…)时初始化。 4.3 DLAttachable.java/DLServiceAttachable.java DLServiceAttachable 与 DLAttachable 类似,下面先分析 DLAttachable.java。 DLAttachable 是一个接口,主要作用是以统一所有不同类型的代理 Activity,如DLProxyActivity、...
(3) 组件:指 Android 中的Activity、Service、BroadcastReceiver、ContentProvider,目前 DL 支持Activity、Service以及动态的BroadcastReceiver。 (4) 插件组件:插件中的组件。 (5) 代理组件:在宿主的 Manifest 中注册,启动插件组件时首先被启动的组件。目前包括 DLProxyActivity(代理 Activity)、DLProxyFragmentActivity(...
DLIntent的定义,通过自定义的intent,来完成activity的无约束调起 UI Bus 一些android特性的支持##效果 首先宿主程序运行后,会把位于/mnt/sdcard/DynamicLoadHost目录下的所有apk都加载进来,然后点击列表就可以调起对应的apk,本文中的demo和第一篇文章中的demo看起来差不多,实际是有区别的,区别有两点:activity具有...
The files will be located in thedistdirectory. To run the browser tests first build theloadjslibrary: $ npm run build-tests Then visithttp://localhost:3000/test About A tiny async loader / dependency manager for modern browsers (961 bytes) ...
其中第一步设置intent 的 ClassLoader是用于 unparcel Parcelable 数据的,可见介绍: android.os.BadParcelableException。 (3) protected void launchTargetActivity()加载待启动插件 Activity 完成初始化流程,并通过DLPlugin和DLAttachable接口的 attach 函数实现和代理 Activity 的双向绑定。流程图见上图虚线框部分。
Android.Companion.Virtual Android.Content Android.Content.OM Android.Content.PM Android.Content.PM ActivityColorMode ActivityInfo ActivityInfo.InterfaceConsts ActivityInfo.WindowLayout ActivityInfoFlags ActivityPersistableMode ApkChecksum ApkChecksum.InterfaceConsts ApplicationCategories ApplicationInfo ApplicationInfo.Disp...
These built-in dashboards are widely used in the open-source community for monitoring Kubernetes clusters with Prometheus and Grafana. Use these dashboards to see metrics, such as resource usage, pod health, and network activity. You can also create custom dashboards that are tailored to your...
接下来就是考虑怎么调用的问题了,我们可以这么做,在DL的 DlPluginManager中增加一下方法: 将plugin类反射出来,由于plugin类是继承 plugininterface 接口的,所以通过反射出来的 PluginInterface,中的接口是可以调用到插件的方法的!!! plugin的代码如下: 由于dl是通过代理实现的 所有plugin中activity其实都是host中代理...
这里核心方法,在 dex_files = runtime->GetOatFileManager().OpenDexFilesFromOat() 也就是说,dex文件其实是在OatFile里面查找 通过翻阅应用安装流程 art虚拟机下,应用在安装过程,通过dex2oat,转化成一个ELF格式 文件存放起来。BaseDexClassLoader加载dex文件探索到这里。 下面我们分析BaseDexClassLoader的loadClass...