• Stars
    star
    427
  • Rank 101,680 (Top 3 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 10 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android插件开发库,动态加载apk文件。

OSL
CJFrameForAndroid简介


原理描述

CJFrameForAndroid的实现原理是通过类加载器,动态加载存在于SD卡上的apk包中的Activity。通过使用一个托管所,插件Activity全部事务(包括声明周期与交互事件)将交由托管所来处理,间接实现插件的运行。更多介绍:CJFrameForAndroid原理介绍
一句话概括:CJFrameForAndroid中的托管所,复制了插件中的Activity,来替代插件中的Activity与用户交互。

框架使用

  1. 需要注意的是,插件中所涉及的权限,都需要在宿主中加以声明。宿主Manifest文件写法请参考:AndroidManifest.xml
  2. 你只需要在你项目想要启动插件的任意位置(UI线程中),例如Button的Onclick事件中加入如下代码即可。
/**
 * @param context 上下文对象
 * @param path  插件所在的绝对路径
 */
CJActivityUtils.startPlugin(context,path);

许可

Copyright (c) 2014, Zhang Tao.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

KJFrameForAndroid

An Android library and includes ActivityFrame, KJHttp, KJBitmap, KJDataBase. KJFrameForAndroid is designed to wrap complexity of the Android native SDK and keep things simple.
Java
1,948
star
2

TheMVP

An Android MVP Architecture Diagram Framwork.
Java
1,693
star
3

EmojiChat

Android聊天界面+emoji表情+大表情实现
Java
1,353
star
4

RxVolley

RxVolley = Volley + RxJava(RxJava3.0) + OkHttp(OkHttp3)
Java
1,157
star
5

KJGallery

一个支持Gif图片以及普通图片预览,支持双击缩放,单机退出,同时可以选择使用jni的形式去高效加载gif或者更更精简的(仅2个类)gif控件
Java
303
star
6

KotlinPrimer

极客时间视频中的PPT与代码
Kotlin
303
star
7

KotlinDoc-cn

Kotlin语言文档翻译项目
272
star
8

CodeCafe

开源实验室手机客户端
Java
264
star
9

Contacts

Android联系人列表界面
Java
221
star
10

Modularity

Modular App Architecture
Java
206
star
11

FaceRecognition

一个智能裁剪照片所需部分的项目
Java
148
star
12

KJController

我未来房间的综合控制器
Java
56
star
13

Common

common library
Java
41
star
14

CoreModule

myself core module.
Java
39
star
15

RecyclerViewDemo

RecyclerViewDemo 常用操作演示
Java
39
star
16

OpenLicense

The open source license translate to chinese project.
29
star
17

PWAblog

Progressive Web Apps Blog
CSS
17
star
18

TheRouterIdeaPlugin

TheRouter 路由跳转IDE插件
Kotlin
10
star
19

AndroidCoroutine

C++
10
star
20

Chidori

A library for using EventBus between processes, base on BroadcastReceiver.
Java
8
star
21

IO2017

Google I/O 2017 Android related demo
Java
4
star
22

kymjs.github.io

Progressive Web App Blog
CSS
4
star
23

oschina-gam

kotlin for android project
Java
3
star
24

flutter_demo

flutter demo
Dart
2
star
25

Faraday

A set of perfect H5 hybrid jsbridge solution of Android
Java
2
star
26

IDEASetting

Android Studio or Idea Setting
Java
1
star