1, rely on

implementation 'com.github.zxyUncle:zxyDowloadFile:latest.release'
Copy the code

2. Automatically obtain read and write permissions

3, a sentence to start downloading

Dowloadfile. init(apkPath, this) {step, isSuccess ->Copy the code

4, custom dialog box, or use the demo dialog box, change the layout is OK

Build (this).setview (r.layout.dialog_button) // Mandatory layout view. create {View, AlertDialogUtils -> handle the click eventCopy the code

The source address