Skip to content

Commit fe247db

Browse files
NutrientNutrient
Nutrient
authored and
Nutrient
committed
Update example to Nutrient for Android 10.0.0
1 parent 252d722 commit fe247db

File tree

12 files changed

+28
-28
lines changed

12 files changed

+28
-28
lines changed

LICENSE

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
The PSPDFKit Sample applications are licensed with a modified BSD
1+
The Nutrient Android SDK Sample applications are licensed with a modified BSD
22
license. In plain language: you're allowed to do whatever you wish
33
with the code, modify, redistribute, embed in your products (free or
44
commercial), but you must include copyright, terms of usage and
55
disclaimer as stated in the license.
66

7-
You will require a commercial PSPDFKit License to run these examples
8-
in non-demo mode. Please refer to sales@pspdfkit.com for details.
7+
You will require a commercial Nutrient Android SDK License to run these examples
8+
in non-demo mode. Please refer to sales@nutrient.io for details.
99

10-
Copyright © 2016-present PSPDFKit GmbH.
10+
Copyright © 2016-present PSPDFKit GmbH d/b/a Nutrient.
1111
All rights reserved.
1212

1313
Redistribution and use in source or binary forms,
@@ -22,10 +22,10 @@ that the following conditions are met:
2222
documentation and/or other materials provided with the
2323
distribution.
2424

25-
- Redistributions of PSPDFKit Samples must include attribution to
26-
PSPDFKit, either in documentation or other appropriate media.
25+
- Redistributions of Nutrient Android SDK Samples must include attribution to
26+
Nutrient, either in documentation or other appropriate media.
2727

28-
- Neither the name of the PSPDFKit, PSPDFKit GmbH, nor its developers
28+
- Neither the name of Nutrient, PSPDFKit GmbH, nor its developers
2929
may be used to endorse or promote products derived from
3030
this software without specific prior written permission.
3131

app/build.gradle.kts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019-2024 PSPDFKit GmbH. All rights reserved.
2+
* Copyright © 2019-2025 PSPDFKit GmbH. All rights reserved.
33
*
44
* The PSPDFKit Sample applications are licensed with a modified BSD license.
55
* Please see License for details. This notice may not be removed from this file.
@@ -20,10 +20,10 @@ android {
2020
versionCode = 1
2121
versionName = "1.0"
2222

23-
// This is used to inject the PSPDFKit license key directly into your app's AndroidManifest.xml file.
24-
// Doing so will automatically initialize PSPDFKit during the app startup. Replace the
25-
// LICENSE_KEY_GOES_HERE placeholder with your personal PSPDFKit license which you can find in
26-
// your customer portal at https://customers.pspdfkit.com or keep this unchanged to run PSPDFKit as a trial.
23+
// This is used to inject the Nutrient license key directly into your app's AndroidManifest.xml file.
24+
// Doing so will automatically initialize Nutrient during the app startup. Replace the
25+
// LICENSE_KEY_GOES_HERE placeholder with your personal Nutrient license which you can find in
26+
// your customer portal at https://my.nutrient.io or keep this unchanged to run Nutrient as a trial.
2727
manifestPlaceholders["pspdfkitLicenseKey"] = "LICENSE_KEY_GOES_HERE"
2828
}
2929

@@ -41,6 +41,6 @@ dependencies {
4141

4242
// Nutrient is integrated from the Nutrient Maven repository. See the `repositories` block at the beginning
4343
// of this file, which shows how to set up the repository in your app.
44-
implementation("com.pspdfkit:pspdfkit:2024.9.1")
44+
implementation("io.nutrient:nutrient:10.0.0")
4545

4646
}

app/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?><!--
2-
~ Copyright © 2019-2024 PSPDFKit GmbH. All rights reserved.
2+
~ Copyright © 2019-2025 PSPDFKit GmbH. All rights reserved.
33
~
44
~ The PSPDFKit Sample applications are licensed with a modified BSD license.
55
~ Please see License for details. This notice may not be removed from this file.

app/src/main/assets/demo.pdf

1.68 MB
Binary file not shown.

app/src/main/java/com/pspdfkit/example/ExtractAssetTask.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019-2024 PSPDFKit GmbH. All rights reserved.
2+
* Copyright © 2019-2025 PSPDFKit GmbH. All rights reserved.
33
*
44
* The PSPDFKit Sample applications are licensed with a modified BSD license.
55
* Please see License for details. This notice may not be removed from this file.

app/src/main/java/com/pspdfkit/example/MainActivity.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019-2024 PSPDFKit GmbH. All rights reserved.
2+
* Copyright © 2019-2025 PSPDFKit GmbH. All rights reserved.
33
*
44
* The PSPDFKit Sample applications are licensed with a modified BSD license.
55
* Please see License for details. This notice may not be removed from this file.
@@ -17,7 +17,7 @@
1717
import androidx.annotation.NonNull;
1818
import androidx.annotation.Nullable;
1919
import androidx.appcompat.app.AppCompatActivity;
20-
import com.pspdfkit.PSPDFKit;
20+
import com.pspdfkit.Nutrient;
2121
import com.pspdfkit.configuration.activity.PdfActivityConfiguration;
2222
import com.pspdfkit.configuration.page.PageFitMode;
2323
import com.pspdfkit.configuration.page.PageScrollDirection;
@@ -77,13 +77,13 @@ protected void onDestroy() {
7777
* using {@link #launchPdfActivity(Uri)}.
7878
*/
7979
private void prepareAndShowDocument(@NonNull final Uri uri) {
80-
// PSPDFKit supports direct opening of documents from various URI locations (including
80+
// Nutrient supports direct opening of documents from various URI locations (including
8181
// assets,
8282
// local file URIs, content provider URIs, etc.).
83-
if (PSPDFKit.isOpenableUri(this, uri)) {
83+
if (Nutrient.isOpenableUri(this, uri)) {
8484
launchPdfActivity(uri);
8585
} else {
86-
// Only document accessible as files are openable directly with PSPDFKit so we have to
86+
// Only document accessible as files are openable directly with Nutrient so we have to
8787
// transfer other documents to application cache
8888
final DownloadRequest request =
8989
new DownloadRequest.Builder(this).uri(uri).build();
@@ -113,7 +113,7 @@ private void prepareAndShowDemoDocument() {
113113
}
114114
/**
115115
* Launches the {@link com.pspdfkit.ui.PdfActivity} for showing the document located at the
116-
* given URI. The URI must be openable (i.e. {@link PSPDFKit#isOpenableUri(Context, Uri)} has to
116+
* given URI. The URI must be openable (i.e. {@link Nutrient#isOpenableUri(Context, Uri)} has to
117117
* return {@code true} for the URI).
118118
*/
119119
private void launchPdfActivity(@NonNull final Uri uri) {

app/src/main/res/layout/activity_main.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
~ Copyright © 2019-2024 PSPDFKit GmbH. All rights reserved.
2+
~ Copyright © 2019-2025 PSPDFKit GmbH. All rights reserved.
33
~
44
~ The PSPDFKit Sample applications are licensed with a modified BSD license.
55
~ Please see License for details. This notice may not be removed from this file.

app/src/main/res/values/colors.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
~ Copyright © 2019-2024 PSPDFKit GmbH. All rights reserved.
3+
~ Copyright © 2019-2025 PSPDFKit GmbH. All rights reserved.
44
~
55
~ The PSPDFKit Sample applications are licensed with a modified BSD license.
66
~ Please see License for details. This notice may not be removed from this file.

app/src/main/res/values/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
~ Copyright © 2019-2024 PSPDFKit GmbH. All rights reserved.
3+
~ Copyright © 2019-2025 PSPDFKit GmbH. All rights reserved.
44
~
55
~ The PSPDFKit Sample applications are licensed with a modified BSD license.
66
~ Please see License for details. This notice may not be removed from this file.

app/src/main/res/values/styles.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
~ Copyright © 2019-2024 PSPDFKit GmbH. All rights reserved.
2+
~ Copyright © 2019-2025 PSPDFKit GmbH. All rights reserved.
33
~
44
~ The PSPDFKit Sample applications are licensed with a modified BSD license.
55
~ Please see License for details. This notice may not be removed from this file.

build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright © 2017-2024 PSPDFKit GmbH. All rights reserved.
2+
* Copyright © 2017-2025 PSPDFKit GmbH. All rights reserved.
33
*
44
* The PSPDFKit Sample applications are licensed with a modified BSD license.
55
* Please see License for details. This notice may not be removed from this file.
66
*/
77

88
plugins {
9-
id("com.android.application") version "8.7.2" apply false
9+
id("com.android.application") version "8.8.0" apply false
1010
id("org.jetbrains.kotlin.android") version "2.0.20" apply false
1111
}

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip

0 commit comments

Comments
 (0)