Pgyer Docs
SDK (Archived)

Android SDK 2.x FAQ

Common questions and answers for integrating and using Pgyer Android SDK 2.x.

The Pgyer SDK is no longer maintained. For new integrations, use the Pgyer API directly. This page is kept for reference on legacy versions.

This page collects common questions when using Pgyer Android SDK 2.x.

User Feedback

The feedback screenshot is not displayed. Why?

Check whether android.permission.WRITE_EXTERNAL_STORAGE is declared in AndroidManifest.xml.

The feedback screenshot is not the current Activity?

When using container classes like TabActivity or GroupActivity, do not call PgyFeedbackShakeManager.register(...) in their onResume(). Call it inside the child Activity's onResume() instead.

The screenshot uploaded from a game is black?

Add the following in onDrawFrame:

PgyFeedbackShakeManager.setGLSurface(true);
GLSurfaceUtils.getInstance().takeScreenShot(gl);

Version Updates

How do I customize the update dialog?

PgyUpdateManager.register(MainActivity.this, Constants.APPID, new UpdateManagerListener() {
    @Override
    public void onUpdateAvailable(String result) {
        // Show your custom dialog
    }
});

How do I test the update flow?

Integrate the SDK, build and upload to Pgyer, then scan the QR code to install. Upload a newer build, and opening the old version on the device will trigger the update prompt.

Lowering android:versionCode in AndroidManifest.xml below the latest value on Pgyer triggers the update prompt immediately for testing.

Why does installing a previous version not show the update prompt?

Common causes:

  1. The historical build did not include the SDK's update feature.
  2. You did not modify versionCode and rely solely on Pgyer's auto-incremented Build number. In that case, the SDK cannot tell which Build of the downloaded apk you are on — it only stores the latest Build. The update is only detected after you upload a newer build.

The custom update install shows "Package parse error"

public void onUpdateAvailable(final String result) {
    // Use the SDK's default download; the URL comes from downloadURL in result
    String downloadUrl = "apk download URL";
    startDownloadTask(MainActivity.this, downloadUrl);
}

Double-check the apk URL. It is not the single-page short link of your app — it must be the value of the downloadURL field inside result.

On this page