DroidPlugin is a new Plugin Framework developed and maintained by Andy Zhang( Fllow me at github ).It enables the host app run any third-party apk without installation, modification and repackage, which benefit a lot for collaborative development on Android.
Unable to send Notification
with custom Resources,eg:
a. Notification with custom RemoteLayout, which means Notification
's contentView
,tickerView
,bigContentView
and headsUpContentView
must be null.
b. Notification with icon customized by R.drawable.XXX. The framework will transform it to Bitmap instead.
Unable to define specified Intent Filter
for the plugged app's Service
、Activity
、BroadcastReceiver
and ContentProvider
. So the plugged app is invisible for the outside system and app.
Lack of Hook
to the Native
layer, thus apk (e.g. a majority of game apps) with native
code cannot be loaded as plugin.
Service
、Activity
、BroadcastReceiver
、ContentProvider
in the host.It is very simple integrate Droid Plugin to your proejct:
Import Droid Plugin project to your project as a lib.
Include following attributes in host's AndroidManifest.xml
:
<application android:name="com.morgoo.droidplugin.PluginApplication"
android:label="@string/app_name"
android:icon="@drawable/ic_launcher" >
Or, if you use customized Application
,add following code in the methods onCreate
and attachBaseContext
:
@Override
public void onCreate() {
super.onCreate();
PluginHelper.getInstance().applicationOnCreate(getBaseContext()); //must be after super.onCreate()
}
@Override
protected void attachBaseContext(Context base) {
PluginHelper.getInstance().applicationAttachBaseContext(base);
super.attachBaseContext(base);
}
Modify the authorityName
value in Libraries\DroidPlugin\build.gradle
(suggested use your package name)
Install/Upgrade, use this method:
int PluginManager.getInstance().installPackage(String filepath, int flags);
For installation, filepath
set to path of the .apk file, and flags
set to 0.
For upgrade, filepath
set to path of the .apk file, and flags
set to PackageManagerCompat.INSTALL_REPLACE_EXISTING
.
Uninstall, use this method:
int PluginManager.getInstance().deletePackage(String packageName,int flags);
packageName
is package name of the plugged app,flags = 0
。
Activate
Just use android's API, same for communication between components.
Please feel free to report bugs or ask for help via email.QQ Group:318901026
##Who is using Droid Plugin?
Translated by Ming Song(gnosoir@hotmail.com)
1,DroidPlugin 使用方法 https://github.com/Qihoo360/DroidPlugin/blob/master/readme_cn.md 说明了DroidPlugin的使用方法以及特点。 HOST程序:插件的宿主。 插件:免安装运行的APK 限制和缺陷: 1,无法在插件中发送具有自定义资源的Notification,例如:a. 带自定义RemoteLayout的Not
DroidPlugin 是360手机助手在Android系统上实现了一种新的插件机制:它可以在无需安装、修改的情况下运行APK文件,此机制对改进大型APP的架构,实现多团队协作开发具有一定的好处。 开源项目地址 https://github.com/Qihoo360/DroidPlugin 定义: HOST程序:插件的宿主。 插件:免安装运行的APK 限制和缺陷: 无法在插件中发送具有自定
如果读者对插件化还有些陌生,请参考我这篇文章"大型移动应用解决之道 - 插件化" Replugin与DroidPlugin相信读者对这两个框架都有了一些了解,这篇文章主要是笔者对这两个框架的技术实现不同的地方进行的一个总结,希望能帮助读者理解这两个框架。 Replugin与DroidPlugin共同面临的问题 1. 插件中的组件(Activity等)启动的问题? 2. 插件中的Class如何加载?
======= 作用是静默安装app,然后跳转,不会弹系统的安装对话框,实际apk安装在data/data/xxx/Plugin文件夹下面,使用adb uninstall卸载不了 demo下载地址(包含module): https://download.csdn.net/download/u010672559/10549320 =========== 1.引入module 2.配置applica
前段时间360在github上公开了DroidPlugin的代码,工作中也正好要用到类似的技术,于是打算花点时间研究一下。 在开始之前,首先需要了解一个概念:Java动态代理。这是实现hook的一个关键技术,在代码里被大量运用。那么什么是Java动态代理呢?下面以一个小例子进行说明。 首先我们定义一个IFruit接口,里面只有一个方法,用来打印水果的名字: public interface IFr
android DroidPlugin DroidPluginTeam/DroidPlugin https://github.com/DroidPluginTeam/DroidPlugin DroidPlugin的示例 https://github.com/SpikeKing/wcl-droid-plugin-demo DroidPlugin的插件App, 和Demo互动 https://gith
360 Android 插件项目 DroidPlugin 这个框架是奇虎360手机助手团队,最近在github上开源出来的Android插件框架。这种精神是很值得鼓励的。 github地址为: https://github.com/Qihoo360/DroidPlugin 好,一下纯属引入了官方的说明: 说明 DroidPlugin是360手机助手在Android系统上实现了一种新的插件机制:
https://blog.csdn.net/turkeycock/category_6723603.html