Pgyer Docs
SDK (Archived)

Android SDK 3.0.0 FAQ

Common questions and troubleshooting tips for integrating and using Pgyer Android SDK 3.0.0.

The Pgyer SDK is no longer maintained. For new integrations, use the Pgyer API directly. This page is kept for projects that already integrated the SDK.

This page collects common issues and troubleshooting tips for Android SDK 3.0.0.

Integration

SDK features do not work after integrating via jar

The following provider entry is missing from AndroidManifest.xml, preventing the SDK from initializing:

<provider
    android:name="com.pgyersdk.PgyerProvider"
    android:authorities="${applicationId}.com.pgyer.provider"
    android:exported="false"/>

AndroidManifest.xml merge fails after integration

Possible causes:

  1. Your project's Android API level is below 16. The SDK requires API 16 or above.
  2. AndroidManifest.xml contains a syntax error. Open the file to check the specific error message.

Version Updates

Copying the custom update dialog demo shows no UI

The custom update hook only exposes minimal logic and logs the key data; no UI is bundled. You need to implement the dialog and download flow yourself.

No install prompt appears after the apk is downloaded

Common causes:

  1. The Install from unknown sources switch is off on the device.
  2. Starting from Android 8.0, installing an apk requires an extra permission:
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
SDK 3.0.1 and above include this permission in the aar; you do not need to add it again.

The auto-update dialog disappears immediately after popping up

3.0.0 automatically unbinds the update dialog, so when the page closes with a delay or through a third-party framework, the dialog is dismissed. Upgrading to the latest version fixes this.

Logs and Errors

How do I verify the SDK is running?

After launching your app, filter PgyerSDK in Android Studio Logcat. You should see:

D/PgyerSDK: PgyerProvider onCreate                     // SDK initialized
D/PgyerSDK: There is a new version                     // A new version is available

When misconfigured you will see:

E/PgyerSDK: App ID is not correct                      // App ID is wrong
W/PgyerSDK: There is no android.permission.WRITE_EXTERNAL_STORAGE   // Missing storage permission
W/PgyerSDK: Please grant permission if you use Pgyer SDK feature.   // Feature unavailable

3.0.0 prints InterruptException

The SDK blocks repeat requests within a short window to avoid wasted traffic, and logs this error when blocking happens. It does not affect the actual behavior of your app. 3.0.1 and above no longer print the message.

Versions before 3.0.0 print NullException from Api.class

It does not affect the app. 3.0.1 fixed it and the message is no longer printed.

On this page