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
获取 App key
添加 Framework
在 Application 中集成
添加权限
上报异常和检查更新
方式一:
repositories {
flatDir {
dirs 'libs' // jar目录
}
}
...
dependencies {
...
implementation files('libs/pgy_analytics_sdk.jar')
}
方式二:
allprojects {
repositories {
...
maven { url "https://raw.githubusercontent.com/Pgyer/analytics/master" }
}
}
dependencies {
...
implementation 'com.pgyer:analytics:4.1.6'
}
通过 Cocoapods 添加 Framework:
上传到蒲公英上的每一个 App 都拥有唯一的 App Key,以此来标识唯一应用,可以在应用管理 — 应用概述中查看。
pod 'Pgyer'
pod 'PgyUpdate'
通手工添加 Framewrok:
下载蒲公英iOS SDK
添加 PgySDK.framework,PgyUpdate.framework.
将 PgySDK.framework 和 PgyUpdate.framework 拖动到你的 Xcode 工程里,并勾选“Copy items if needed”。
导入 SDK 后,切换到 Build Phases 选项卡中,在 Link Binary With Libraries 中添加如下六个系统 Framework:
CoreTelephony.framework
OpenGLES.framework
CoreMotion.framework
AudioToolbox.framework
AvFoundation.framework
SystemConfiguration.framework
import android.app.Application;
import com.pgyer.pgysdk.PgyerSDKManager;
public class {当前应用的application} extends Application {
@Override
public void onCreate() {
super.onCreate();
init(this);
}
//初始化
private static void init( {当前应用的application} application){
new PgyerSDKManager.InitSdk()
.setContext(application) //设置上下问对象
.enable(FeatureEnum.CHECK_UPDATE) //添加检查新版本
.build();
}
}
在 AndroidManifest.xml 修改 android:name=“{当前应用的application}”(此处的名字对应继承上面 Application 的类名),并添加权限
<!-- 必选-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- 获取网络状态 -->
<uses-permission
android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
tools:ignore="ProtectedPermissions" />
<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" /> <!-- 获取网络信息权限-->
<!-- 用户手机设置中允许未知来源安装包安装状态为关;-->
<!-- Android8.0 以后,如果要安装 apk 需要额外添加权限:-->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<application
android:name=""{当前应用的application}"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data
android:name="PGYER_API_KEY"
android:value="蒲公英后台申请的apikey"></meta-data>
<meta-data
android:name="PGYER_FRONTJS_KEY"
android:value="蒲公英后台申请的frontJSToken"></meta-data>
<!--添加新版本检测-->
<meta-data
android:name="PGYER_FEATURE_CHECK_UNPDATE"
android:value="true"></meta-data>
</application>
import com.pgyer.pgyersdk.PgyerSDKManager;
...
PgyerSDKManager.reportException(Exception e);
import com.pgyer.pgyersdk.PgyerSDKManager;
...
PgyerSDKManager.checkSoftwareUpdate(Exception e);
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)