处理获取参数出错的bug

This commit is contained in:
范大德 2023-07-28 22:30:01 +08:00
parent 766479d682
commit 81320dd623
3 changed files with 54 additions and 11 deletions

View File

@ -12,7 +12,7 @@
<config-file parent="/*" target="res/xml/config.xml">
<feature name="TpnsPlugin">
<param name="android-package" value="com.shuto.plugin.tpns.TpnsPlugin" />
<param name="XG_ACCESS_ID" value="$XG_ACCESS_ID" />
<param name="XG_ACCESS_ID" value="$XG_ACCESS_ID" />
<param name="XG_ACCESS_KEY" value="$XG_ACCESS_KEY" />
</feature>
</config-file>

View File

@ -17,7 +17,7 @@ import com.tencent.android.tpush.XGPushTextMessage;
import org.json.JSONException;
import org.json.JSONObject;
public abstract class TpnsReceiver extends XGPushBaseReceiver {
public class TpnsReceiver extends XGPushBaseReceiver {
private static final String TAG = TpnsPlugin.class.getSimpleName();
/**
@ -110,6 +110,41 @@ public abstract class TpnsReceiver extends XGPushBaseReceiver {
Log.d(TAG, "广播接收到通知:" + text);
}
@Override
public void onRegisterResult(Context context, int i, XGPushRegisterResult xgPushRegisterResult) {
}
@Override
public void onUnregisterResult(Context context, int i) {
}
@Override
public void onSetTagResult(Context context, int i, String s) {
}
@Override
public void onDeleteTagResult(Context context, int i, String s) {
}
@Override
public void onSetAccountResult(Context context, int i, String s) {
}
@Override
public void onDeleteAccountResult(Context context, int i, String s) {
}
@Override
public void onSetAttributeResult(Context context, int i, String s) {
}
@Override
public void onQueryTagsResult(Context context, int errorCode, String data, String operateName) {
Log.i(TAG, "action - onQueryTagsResult, errorCode:" + errorCode + ", operateName:" + operateName + ", data: " + data);
@ -122,4 +157,9 @@ public abstract class TpnsReceiver extends XGPushBaseReceiver {
});
}
@Override
public void onDeleteAttributeResult(Context context, int i, String s) {
}
}

View File

@ -10,10 +10,12 @@ def getConfigPreference(name) {
if (attrName && attrName.toLowerCase() == "tpnsplugin") {
it.param.each { p ->
def pName = p.attribute("name")
if (p.attribute('default') != null) {
defaultValue = p.attribute('default');
} else {
ret = p.attribute("value")
if(pName && pName.toLowerCase() == name){
if (p.attribute('default') != null) {
defaultValue = p.attribute('default');
} else {
ret = p.attribute("value")
}
}
}
@ -29,14 +31,14 @@ android {
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'
}
manifestPlaceholders = [
XG_ACCESS_ID : getConfigPreference("XG_ACCESS_ID"),
XG_ACCESS_KEY : getConfigPreference("XG_ACCESS_KEY"),
XG_ACCESS_ID : getConfigPreference("XG_ACCESS_ID"),
XG_ACCESS_KEY : getConfigPreference("XG_ACCESS_KEY"),
]
}
}
dependencies {
//
implementation 'com.tencent.tpns:tpns:1.4.0.1-release'
//
implementation 'com.tencent.tpns:tpns:1.4.0.1-release'
// TPNS [VERSION] SDK 2
//implementation 'com.tencent.tpns:honor:1.4.0.1-release' //耀
implementation 'com.tencent.tpns:meizu:1.4.0.1-release' //
@ -50,4 +52,5 @@ dependencies {
implementation 'commons-codec:commons-codec:1.15'
}
}