Pgyer internal test distribution service is a leading mobile application internal test distribution platform in China, dedicated to providing easy-to-use App internal test distribution services for mobile developers and test users.
Pgyer Developer Service Platform is committed to providing excellent upstream and downstream services for developers, addressing the various needs of developers throughout the developer life cycle.
Scan QR code to follow
Pgyer WeChat Official Account
Get the latest news, official benefits, promotions and other information
Pgyer document center
This article describes on how to integrate PgyerSDK into your Android apps. It allows testers to update your app to another beta version right from within the application. It will notify the tester if a new update is available. It also allows to send feedback and crash reports right from within the application. If a crash has happened, it will send information about the crash to the server immediately.
App ID: the ID that uniquely identifies an App in payer.com, developers can get App ID from application manage page.
For Eclipse
Users
Copy pgyersdk.jar to your project‘s libs directory.
For Android Studio
Users add the following codes into the build.gradle file in your project:
allprojects {
repositories {
jcenter()
maven { url "https://raw.githubusercontent.com/Pgyer/mvn_repo_pgyer/master" }
}
}
Then add the dependency into build.gradle files in your module:
dependencies {
compile 'com.pgyersdk:sdk:2.8.0'
}
In addition to the above method 'Android Studio' users also can use the same methods with 'Eclipse' users.
<!-- Required -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.GET_TASKS"/>
<!-- Optional -->
<uses-permission android:name="android.permission.READ_LOGS" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<!-- Optional -->
<activity android:name="com.pgyersdk.activity.FeedbackActivity"/>
<!-- Required -->
<meta-data
android:name="PGYER_APPID"
android:value="4b6e8877dfcc2462bedb37dcf66b6d87" >
</meta-data>
</application>
import com.pgyersdk.crash.PgyCrashManager;
import android.app.Application;
public class PgyApplication extends Application {
@Override
public void onCreate() {
// TODO Auto-generated method stub
super.onCreate();
PgyCrashManager.register(this);
}
}
Don't forget to replace android:name=".PgyApplication
with your application name in the file of AndroidManifest.xml
<application
android:name=".PgyApplication"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.pgyer.pgyersdk.test.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
import com.pgyersdk.crash.PgyCrashManager;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
PgyCrashManager.register(this);
}
}
Find proguard/mapping.txt from your project directory.
Upload the file proguard/mapping.txt to your app's page.
try
{
}
catch (Exception e)
{
PgyCrashManager.reportCaughtException(MainActivity.this, e);
}
import com.pgyersdk.feedback.PgyFeedbackShakeManager;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
// custom sensitivity, defaults to 950, the smaller the number higher sensitivity.
PgyFeedbackShakeManager.setShakingThreshold(1000);
// Open as a dialog
PgyFeedbackShakeManager.register(MainActivity.this);
// Open as an Activity, in the case you must configure FeedbackActivity in the file of AndroidManifest.xml
PgyFeedbackShakeManager.register(MainActivity.this, false);
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
PgyFeedbackShakeManager.unregister();
}
}
public void onDrawFrame(GL10 gl) {
PgyFeedbackShakeManager.setGLSurface(true);
GLSurfaceUtils.getInstance().takeScreenShot(gl);
}
// Open as a dialog
PgyFeedback.getInstance().show(MainActivity.this);
// Open as an Activity, in the case you must configure FeedbackActivity in the file of AndroidManifest.xml
PgyFeedback.getInstance().showActiivty(MainActivity.this);
PgyerDialog.setDialogTitleBackgroundColor("#ff0000");
PgyerDialog.setDialogTitleTextColor("#ffffff");
// Set navigation and bottom bar background
FeedbackActivity.setBarBackgroundColor("#ff0000");
// Set button backgournd when pressed.
FeedbackActivity.setBarButtonPressedColor("#ff0000");
// Set color picker background
FeedbackActivity.setColorPickerBackgroundColor("#ff0000");
PgyUpdateManager.register(this);
PgyUpdateManager.register(MainActivity.this,
new UpdateManagerListener() {
@Override
public void onUpdateAvailable(final String result) {
// Encapsulates new version information into AppBean
final AppBean appBean = getAppBeanFromString(result);
new AlertDialog.Builder(MainActivity.this)
.setTitle("Update Available")
.setMessage("")
.setNegativeButton(
"OK",
new DialogInterface.OnClickListener() {
@Override
public void onClick(
DialogInterface dialog,
int which) {
startDownloadTask(
MainActivity.this,
appBean.getDownloadURL());
}
}).show();
}
@Override
public void onNoUpdateAvailable() {
}
});
-libraryjars libs/pgyer_sdk_android_2.8.0.jar
-dontwarn com.pgyersdk.**
-keep class com.pgyersdk.** { *; }
About Us
Product Services
Your account information is under review and can not be used temporarily; you can:
Check out the help documentation for common ways to work on the Pgyer's platform;
Check Pgyer's App Auditing , which must be viewed before uploading.
Currently, the real-name authentication has not been completed, and the number of downloads for each version is limited to 0 times/day, After real-name authentication, it can be extended to 500 times/day
TestFlight is only available to Professional users.(Click understand pgyer's price plan)
支付成功
Pgyer VIP User Group
(Please open WeChat - Sweep and join the group chat)