Giter Club home page Giter Club logo

downloadinstaller's Introduction

DownloadInstaller

App 应用内下载更新,希望小而美。更多需求请提Issues

Github :https://github.com/AnyLifeZLB/DownloadInstaller

Android 应用内下载,储存,安装 ,未知来源等问题处理

  • 处理好了全局FileProvider,未知来源授权确认,通知栏等问题处理。
  • 已经下载的文件不会重复下载
  • 特别是Android 8 首次安装时候的未知来源问题处理,这里的处理方式很强硬,不授权安装未知来源就会一直跳转到授权页面,企业级别的App应用内更新很实用
  • 当然这是可以配置是否需要强制授权安装未知来源 参考:new DownloadInstaller(mContext, downloadUrl, isForceGrantUnKnowSource

使用 (1.1.2 版本后支持AndroidX 了)

首先 Gradle 引入(1.1.1 版本是最后一个support 版本,后面是AndroidX了)

implementation 'anylife.downloadinstaller:downloadInstaller:1.1.3'

然后 targetSDK>= 26

  //一般的弹出对话框提示升级
  //如果是企业内部应用升级,肯定是要这个权限; 其他情况不要太流氓,TOAST 提示
   new DownloadInstaller(mContext, downloadUrl, isForceGrantUnKnowSource,new DownloadProgressCallBack() {
       @Override
       public void downloadProgress(int progress) {
             Log.e("PROGRESS","Progress"+progress);
       }
  
       @Override
       public void downloadException(Exception e) {
             e.printStackTrace();
       }
  

       @Override
       public void onInstallStart() {
  
       }
   }).start();
   

. More,Contact me : [email protected]

image.png

downloadinstaller's People

Contributors

faceai avatar anylifezlb avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.