1 package com.netease.nimlib.sdk.mixpush;
3 import androidx.annotation.Nullable;
4 import java.io.Serializable;
5 import org.json.JSONException;
6 import org.json.JSONObject;
116 JSONObject
object =
new JSONObject();
119 object.putOpt(KEY_XM_APP_ID, xmAppId);
120 object.putOpt(KEY_XM_APP_KEY, xmAppKey);
121 object.putOpt(KEY_XM_CERTIFICATE_NAME, xmCertificateName);
122 object.putOpt(KEY_HW_APP_ID, hwAppId);
123 object.putOpt(KEY_HW_CERTIFICATE_NAME, hwCertificateName);
124 object.putOpt(KEY_MZ_APP_ID, mzAppId);
125 object.putOpt(KEY_MZ_APP_KEY, mzAppKey);
126 object.putOpt(KEY_MZ_CERTIFICATE_NAME, mzCertificateName);
127 object.putOpt(KEY_FCM_CERTIFICATE_NAME, fcmCertificateName);
128 object.putOpt(KEY_VIVO_CERTIFICATE_NAME, vivoCertificateName);
129 object.putOpt(KEY_OPPO_APP_ID, oppoAppId);
130 object.putOpt(KEY_OPPO_APP_KEY, oppoAppKey);
131 object.putOpt(KEY_OPPO_APP_SERCET, oppoAppSercet);
132 object.putOpt(KEY_OPPO_CERTIFICATE_NAME, oppoCertificateName);
133 object.putOpt(KEY_AUTO_SELECT_PUSH_TYPE, autoSelectPushType);
134 object.putOpt(KEY_HONOR_CERTIFICATE_NAME, honorCertificateName);
135 }
catch (JSONException e) {
142 if (
object == null) {
147 config.
xmAppId =
object.optString(KEY_XM_APP_ID, null);
148 config.
xmAppKey =
object.optString(KEY_XM_APP_KEY, null);
150 config.
hwAppId =
object.optString(KEY_HW_APP_ID, null);
152 config.
mzAppId =
object.optString(KEY_MZ_APP_ID, null);
153 config.
mzAppKey =
object.optString(KEY_MZ_APP_KEY, null);
157 config.
oppoAppId =
object.optString(KEY_OPPO_APP_ID, null);
158 config.
oppoAppKey =
object.optString(KEY_OPPO_APP_KEY, null);
159 config.
oppoAppSercet =
object.optString(KEY_OPPO_APP_SERCET, null);
static MixPushConfig fromJson(@Nullable JSONObject object)
static final String KEY_MZ_APP_KEY
String fcmCertificateName
FCM 推送证书,请在云信管理后台申请 海外客户使用
String xmCertificateName
小米推送证书,请在云信管理后台申请
String xmAppKey
小米推送 appKey
static final String KEY_XM_CERTIFICATE_NAME
String hwAppId
华为推送 hwAppId
String oppoAppSercet
oppo 推送AppSecret
String honorCertificateName
荣耀推送 appId请在 AndroidManifest.xml 文件中配置 荣耀推送证书,请在云信管理后台申请 ...
String hwCertificateName
华为推送证书,请在云信管理后台申请
static final String KEY_HW_APP_ID
static final String KEY_OPPO_CERTIFICATE_NAME
static final String KEY_MZ_CERTIFICATE_NAME
Created by chenkang on 2017/11/20.
static final String KEY_HW_CERTIFICATE_NAME
static final String KEY_OPPO_APP_ID
static final String KEY_AUTO_SELECT_PUSH_TYPE
String oppoAppKey
oppo 推送appKey
boolean autoSelectPushType
是否根据token自动选择推送类型
static final String KEY_XM_APP_ID
static final String KEY_HONOR_CERTIFICATE_NAME
String mzCertificateName
魅族推送证书,请在云信管理后台申请
String mzAppKey
魅族推送 appKey
static final String KEY_XM_APP_KEY
static final String KEY_OPPO_APP_SERCET
String oppoCertificateName
OPPO推送证书,请在云信管理后台申请
static final String KEY_OPPO_APP_KEY
String vivoCertificateName
VIVO推送 appId apiKey请在 AndroidManifest.xml 文件中配置 VIVO推送证书,请在云信管理后台申请 ...
static final String KEY_FCM_CERTIFICATE_NAME
static final String KEY_MZ_APP_ID
String oppoAppId
oppo 推送appId
static final String KEY_VIVO_CERTIFICATE_NAME