Neptune是一款灵活,功能强大且轻量级的Android插件框架

网友投稿 1126 2022-11-02

Neptune是一款灵活,功能强大且轻量级的Android插件框架

Neptune是一款灵活,功能强大且轻量级的Android插件框架

Neptune

Neptune is a flexible, powerful and lightweight plugin framework for Android.

It now runs plugins dynamically on billions of devices every day and carries many separated business modules of IQIYI such as Reader, Movie Tickets and etc..

Especially, Neptune is greatly compatible with Android P . It can run on Android P devices seamlessly and stably. Only few APIs in light greylist are used.

中文文档

Supported Features

FeatureDetail
Supported ComponentsActivity/Service/Receiver
Component registration in Host Manifest.xmlNo Need
Share Host App ClassSupported
Share Host App ResourcesSupported
Resources IsolationSupported
Run individual AppSupported
Android FeaturesAlmost all features
CompatibilityAlmost all roms
Process IsolationSupported
Plugin DependencySupported
Plugin Developmentlike normal app
Supported Android versionsAPI Level 14+

Architecture

Getting Started

Host Project

compile Neptune in application module of build.gradle.

implementation 'org.qiyi.video:neptune:2.7.0'

Initialize sdk in your Application#onCreate().

public class XXXApplication extends Application { @Override public void onCreate() { NeptuneConfig config = new NeptuneConfig.NeptuneConfigBuilder() .configSdkMode(NeptuneConfig.INSTRUMENTATION_MODE) .enableDebug(BuildConfig.DEBUG) .build(); Neptune.init(this, config); }}

more details and developer guide see wiki

Plugin Project

If plugin app wants to share resources with host app, you need add dependency in the buildscript block of build.gradle in root of plugin project as following.

dependencies { classpath 'com.iqiyi.tools.build:neptune-gradle:1.4.0'}

Apply gradle plugin in application module of build.gradle and config it.

apply plugin: 'com.qiyi.neptune.plugin'neptune { pluginMode = true // In plugin apk build mode packageId = 0x30 // The package id of Resources hostDependencies = "{group1}:{artifact1};{group2}:{artifact2}" // host app resources dependencies}

Developer Guide

API document wikiHost App Sample ProjectPlugin App Sample ProjectRead SDKLibrary source code

Contribution

We sincerely appreciate your PR contribution of any kind , including codes, suggestions or documentation to improve our project.

License

Neptune is Apache v2.0 Licensed.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:这是一个基于Django开发框架开发的主机管理系统
下一篇:SpringBoot+Netty实现简单聊天室的示例代码
相关文章

 发表评论

暂时没有评论,来抢沙发吧~