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;
121 JSONObject
object =
new JSONObject();
124 object.putOpt(KEY_XM_APP_ID, xmAppId);
125 object.putOpt(KEY_XM_APP_KEY, xmAppKey);
126 object.putOpt(KEY_XM_CERTIFICATE_NAME, xmCertificateName);
127 object.putOpt(KEY_HW_APP_ID, hwAppId);
128 object.putOpt(KEY_HW_CERTIFICATE_NAME, hwCertificateName);
129 object.putOpt(KEY_MZ_APP_ID, mzAppId);
130 object.putOpt(KEY_MZ_APP_KEY, mzAppKey);
131 object.putOpt(KEY_MZ_CERTIFICATE_NAME, mzCertificateName);
132 object.putOpt(KEY_FCM_CERTIFICATE_NAME, fcmCertificateName);
133 object.putOpt(KEY_VIVO_CERTIFICATE_NAME, vivoCertificateName);
134 object.putOpt(KEY_OPPO_APP_ID, oppoAppId);
135 object.putOpt(KEY_OPPO_APP_KEY, oppoAppKey);
136 object.putOpt(KEY_OPPO_APP_SERCET, oppoAppSercet);
137 object.putOpt(KEY_OPPO_CERTIFICATE_NAME, oppoCertificateName);
138 object.putOpt(KEY_AUTO_SELECT_PUSH_TYPE, autoSelectPushType);
139 object.putOpt(KEY_HONOR_CERTIFICATE_NAME, honorCertificateName);
140 object.putOpt(KEY_MANUAL_PROVIDE_PUSH_TOKEN, manualProvidePushToken);
141 }
catch (JSONException e) {
148 if (
object == null) {
153 config.
xmAppId =
object.optString(KEY_XM_APP_ID, null);
154 config.
xmAppKey =
object.optString(KEY_XM_APP_KEY, null);
156 config.
hwAppId =
object.optString(KEY_HW_APP_ID, null);
158 config.
mzAppId =
object.optString(KEY_MZ_APP_ID, null);
159 config.
mzAppKey =
object.optString(KEY_MZ_APP_KEY, null);
163 config.
oppoAppId =
object.optString(KEY_OPPO_APP_ID, null);
164 config.
oppoAppKey =
object.optString(KEY_OPPO_APP_KEY, null);
165 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
boolean manualProvidePushToken
是否自行传入推送token
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
static final String KEY_MANUAL_PROVIDE_PUSH_TOKEN
String oppoAppId
oppo 推送appId
static final String KEY_VIVO_CERTIFICATE_NAME