Closed kervzcalub closed 5 years ago
@newbie-unknown something like this:
new AppUpdater(this) .setUpdateFrom(UpdateFrom.JSON) .setUpdateJSON(getResources().getString(R.string.up)) .setButtonUpdateClickListener((dialog, which) -> { if(!PreferencesUtility.hasStoragePermission(AppListActivity.this)){ PreferencesUtility.requestStoragePermission(AppListActivity.this); }else { downloadFile(getResources().getString(R.string.up_link)); } }) .start(); }
This library doesn't provide a way to download and install the update (it's not allowed by Google Play Store). You must implement it on your own using DownloadManager or similar.
How to set button that downloads the app automatically? I mean, without going to browser. Or set an download listener