Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download and install the file when it is from the json source #175

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ dependencies {
api 'com.android.support:design:27.1.1'
api 'com.squareup.okhttp3:okhttp:3.10.0'
api 'org.jsoup:jsoup:1.11.3'
api 'com.mindorks.android:prdownloader:0.6.0'
}
Binary file added library/src/main/.DS_Store
Binary file not shown.
16 changes: 16 additions & 0 deletions library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,20 @@

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<application>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>

</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import android.text.TextUtils;
import android.util.Log;

import com.downloader.PRDownloader;
import com.github.javiersantos.appupdater.enums.AppUpdaterError;
import com.github.javiersantos.appupdater.enums.Display;
import com.github.javiersantos.appupdater.enums.Duration;
Expand Down Expand Up @@ -56,6 +57,9 @@ public AppUpdater(Context context) {
this.btnDismiss = context.getResources().getString(R.string.appupdater_btn_dismiss);
this.btnDisable = context.getResources().getString(R.string.appupdater_btn_disable);
this.isDialogCancelable = true;

//Initialize file downloader
PRDownloader.initialize(context);
}

@Override
Expand Down
Loading