An open API service indexing awesome lists of open source software.

https://github.com/justson/pixel-activity-keep-alive

This is android keep alive library,Using a pixel activity to keep process alive.
https://github.com/justson/pixel-activity-keep-alive

Last synced: 9 months ago
JSON representation

This is android keep alive library,Using a pixel activity to keep process alive.

Awesome Lists containing this project

README

          

## 通过一个像素的activity保活

### 使用
* Gradle

```
compile 'com.just.library:pixel:1.0.0'
```

* Maven

```

com.just.library
pixel
1.0.0
pom

```

### 引入
```
PixelActivityUnion
.with(App.mContext)
.targetActivityClazz(PointActivity.class)//
.args(null)//
.setActiviyManager(ActivityManager.getInstance())
.start();
```
### 关闭
```
PixelActivityUnion.quit();
```

### 别忘了配置AndroidManifest
```

```

### 自定义IActivityManager和Activity
IActivityManager是对Activity进行管理的一个接口, 比如启动和销毁,所以根据自己需要重写Add和Remove.
Activity 最好让用户无法感知整过过程, 所以建议Activity尽量小化和透明化.