当前位置: 首页 > 软件库 > 手机/移动开发 > >

DroidPlugin

授权协议 LGPL-3.0 License
开发语言 Java
所属分类 手机/移动开发
软件类型 开源软件
地区 不详
投 递 者 洪宏硕
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Droid Plugin

中文文档

Fllow me at github

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.


Problems to be solved:

  1. Unable to send Notification with custom Resources,eg:

    a. Notification with custom RemoteLayout, which means Notification's contentViewtickerViewbigContentView and headsUpContentView must be null.

    b. Notification with icon customized by R.drawable.XXX. The framework will transform it to Bitmap instead.

  2. Unable to define specified Intent Filter for the plugged app's ServiceActivityBroadcastReceiverand ContentProvider. So the plugged app is invisible for the outside system and app.

  3. Lack of Hook to the Native layer, thus apk (e.g. a majority of game apps) with native code cannot be loaded as plugin.

Features:

  1. Compatible to Android 2.3 and later versions
  2. Given its .apk file, the plugged app could be run either independently or as plugin of the host, NO source code needed.
  3. Unnecessary to register the plugged app's ServiceActivityBroadcastReceiverContentProvider in the host.
  4. The plugged app are recognized as Installed by the host and other plugged apps
  5. Very low level of code invasion, in deed just one line code to integrate DroidPlugin into the host app.
  6. Complete code level separation between host and plugged apps, only system level message passing method provide by Android allowed.
  7. All system API supported
  8. Resources management are also completely separated between host and plugged apps.
  9. Process management for plugged apps, idle processed of the plugged app will be timely recycled to guarantee minimum memory usage.
  10. Static broadcast of plugged app will be treated as dynamic, thus the static broadcasting will never be trigger ifthe plugged app are not activated.

Usage:

Integrate with the host apps

It is very simple integrate Droid Plugin to your proejct:

  1. Import Droid Plugin project to your project as a lib.

  2. 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" >
    
  3. 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);
     }
    
  4. Modify the authorityName value in Libraries\DroidPlugin\build.gradle (suggested use your package name)

Install、Uninstall or Upgrade the plugged app:

  1. 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.

  2. Uninstall, use this method:

     int PluginManager.getInstance().deletePackage(String packageName,int flags);
    

    packageName is package name of the plugged app,flags = 0

  3. Activate

    Just use android's API, same for communication between components.

FAQ

FAQ

Remark:

Please feel free to report bugs or ask for help via email.QQ Group:318901026

##Who is using Droid Plugin?

360 App Store

Thanks:

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