• Stars
    star
    1,064
  • Rank 43,399 (Top 0.9 %)
  • Language
    Java
  • Created over 8 years ago
  • Updated almost 6 years ago

Reviews

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

Repository Details

应用自动静默更新安装库.

Auto Installer Library

Android Arsenal

中文 | English

A library makes your application's auto update more elegant !

Don't forget give me a star :)

Feature

  • Just one line of code to solve the silent download and silent installation
AutoInstaller.getDefault(this).install(APK_FILE_PATH);
  • two ways of silent installation: ROOT and AccessibilityService , can automatically chose the valid way.

image

Dependency

There are two ways:

  • clone this project, and use as dependency
  • just add following code to you build.gradle:
   // Add it in your root build.gradle at the end of repositories
	allprojects {
		repositories {
			...
			maven { url "https://jitpack.io" }
		}
	}
	// Add the dependency
   dependencies {
           compile 'com.github.a-voyager:AutoInstaller:v1.0'
   }

Usage

  • Get the instance get default instance or use AutoInstaller.builder to build a instance
AutoInstaller installer = AutoInstaller.getDefault(this);
  • Register listener
installer.setOnStateChangedListener(new AutoInstaller.OnStateChangedListener() {
    @Override
    public void onStart() {
        // callback when it starts installing
        mProgressDialog.show();
    }
    @Override
    public void onComplete() {
        // callback when is complete request installing
        mProgressDialog.dismiss();
    }
    @Override
    public void onNeed2OpenService() {
        // callback when `AccessibilityService` is needs and start the  `AccessibilityService` Activity
        // here you can notify user to open the service
        Toast.makeText(MainActivity.this, "Please open Accessibility Service", Toast.LENGTH_SHORT).show();
    }
});
  • Installation install() is an asynchronous method, call this to request install an application with parameter file path or http url
// file path
installer.install(APK_FILE_PATH);
// or http url
installer.installFromUrl(APK_URL);

More

Use builder to config installer, contains installation mode、cache directory...

AutoInstaller installer = new AutoInstaller.Builder(this)
        .setMode(AutoInstaller.MODE.AUTO_ONLY)
        .setCacheDirectory(CACHE_FILE_PATH)
        .build();

Updates

  1. fixed on Android O
  2. support override install

Support me

Alipay

Weixin

More Repositories

1

BluetoothHelper

Bluetooth Helper Library.—-蓝牙操作库
Java
1,320
star
2

ScrollNumber

custom widget--srcoll number
Java
796
star
3

WeekToDo

《番茄周》软件开源项目
Java
269
star
4

NetView

自定义控件——蜘网图(雷达图)控件
Java
34
star
5

White

“白噪声”软件开源项目.
Java
31
star
6

GraphView

自定义控件——天气温度折线图
Java
29
star
7

StringExtractor

🚀One Key to Extract String Resource
Java
18
star
8

SmartHouse_Android

单片机课程实践——智能家居系统(安卓端)
Java
9
star
9

LoginSystem_Client

登录注册系统(桌面客户端)——Java课程实践
Java
7
star
10

WaterBubble

自定义控件——水波纹特效
Java
6
star
11

Awesome-Widgets

some simple ui widgets for android developer
Java
5
star
12

ZhihuDaily

仿知乎日报应用.
Java
4
star
13

Light

安卓手电筒应用
Java
4
star
14

WiFi_Tool

安卓WiFi密码查看器
Java
3
star
15

WeatherStation

课程实践——气象站 App
Java
3
star
16

AndroidApplication

This is a repository contains some interesting libraries, app codes, demos...(包含个人收藏的库,应用源码,以及小案例...)
Java
3
star
17

LoginSystem_Server

登录注册系统(Web服务端)——Java课程实践
Java
2
star
18

ControlPCServiceDemo

手机控制局域网内的电脑——电脑端
Java
2
star
19

MqttLib

Mqtt 通信封装库.
Java
2
star
20

AndroidApp

This is a repository backup for AndroidApplication repository.
Java
2
star
21

IndoorMapDemo

use mappwidget implements indoor map
Java
2
star
22

LoginProjectClient

B/S模式登录注册注销(Android客户端)
Java
2
star
23

CountDownButton

自定义控件——验证码倒计时按钮.
Java
2
star
24

ControlPCDemo

手机控制局域网内的电脑——安卓端
Java
2
star
25

Python

my python demos
Python
1
star
26

PingTopDemo

Java
1
star
27

TrackClient

航迹分析管理项目_客户端
Java
1
star
28

MultiSwitchButton

a view implements a switch button with multi choice.
Java
1
star
29

BTChat

蓝牙聊天Demo
Java
1
star
30

a-voyager.github.io

Repository for personal website.
HTML
1
star
31

Awesome-Python

闲暇时光写的一些有趣的 Python 小玩具.
Python
1
star
32

EnvMonitorSystem

智能家居环境监测系统(java上位机软件)——Java课程实践
Java
1
star
33

StepCounter

计步器
Java
1
star
34

MySqlDemo

JAVA链接MySQL数据库Demo
Java
1
star
35

SmartHouse_Server

单片机课程实践——智能家居系统(服务器端)
Java
1
star
36

RxDemo

时下流行火热的框架使用方法案例集合.
Java
1
star
37

MenuDemo

仿天天动听滑动菜单
Java
1
star