修复支付问题
This commit is contained in:
parent
7c44f09803
commit
9dba41c22f
@ -55,9 +55,11 @@ public class CommonAppContext extends MultiDexApplication {
|
|||||||
// RongPushClient.setPushConfig(config); //将推送相关配置设置到 SDK
|
// RongPushClient.setPushConfig(config); //将推送相关配置设置到 SDK
|
||||||
//设置新加坡融云服务器 有时候国内收不到推送是因为这个
|
//设置新加坡融云服务器 有时候国内收不到推送是因为这个
|
||||||
RongIMClient.setServerInfo("navsg01.cn.ronghub.com", null);
|
RongIMClient.setServerInfo("navsg01.cn.ronghub.com", null);
|
||||||
|
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||||
//谷歌推送
|
//谷歌推送
|
||||||
PushConfig gconfig = new PushConfig.Builder().enableFCM(true).build();
|
PushConfig gconfig = new PushConfig.Builder().enableFCM(true).build();
|
||||||
RongPushClient.setPushConfig(gconfig);
|
RongPushClient.setPushConfig(gconfig);
|
||||||
|
}
|
||||||
//初始化友盟统计
|
//初始化友盟统计
|
||||||
// UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
|
// UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
|
||||||
FacebookSdk.sdkInitialize(getApplicationContext());
|
FacebookSdk.sdkInitialize(getApplicationContext());
|
||||||
|
@ -46,6 +46,13 @@ public class LoadingDialog extends AbsDialogFragment {
|
|||||||
hint.setText(showText);
|
hint.setText(showText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setHintText(String text) {
|
||||||
|
if (hint != null) {
|
||||||
|
hint.setText(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
@ -9,9 +9,9 @@ ext {
|
|||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
//正式、
|
//正式、
|
||||||
//serverHost : "https://napi.yaoulive.com",
|
serverHost : "https://napi.yaoulive.com",
|
||||||
// 测试
|
// 测试
|
||||||
serverHost : " https://ceshi.yaoulive.com",
|
//serverHost : " https://ceshi.yaoulive.com",
|
||||||
|
|
||||||
//百度语音识别
|
//百度语音识别
|
||||||
|
|
||||||
|
@ -69,8 +69,12 @@ public class HuaWeiPayManage {
|
|||||||
}).addOnFailureListener(new OnFailureListener() {
|
}).addOnFailureListener(new OnFailureListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Exception e) {
|
public void onFailure(Exception e) {
|
||||||
|
if (e.getMessage() != null) {
|
||||||
|
if (!e.getMessage().contains("60004")) {
|
||||||
Toast.makeText(mContext, e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(mContext, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}).addOnCanceledListener(new OnCanceledListener() {
|
}).addOnCanceledListener(new OnCanceledListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCanceled() {
|
public void onCanceled() {
|
||||||
|
@ -147,8 +147,6 @@ import io.rong.imkit.config.RongConfigCenter;
|
|||||||
import io.rong.imkit.notification.NotificationConfig;
|
import io.rong.imkit.notification.NotificationConfig;
|
||||||
import io.rong.imlib.RongIMClient;
|
import io.rong.imlib.RongIMClient;
|
||||||
import io.rong.imlib.model.Message;
|
import io.rong.imlib.model.Message;
|
||||||
import io.rong.push.PushManager;
|
|
||||||
import io.rong.push.PushType;
|
|
||||||
import kotlin.Unit;
|
import kotlin.Unit;
|
||||||
|
|
||||||
@Route(path = RouteUtil.PATH_MAIN)
|
@Route(path = RouteUtil.PATH_MAIN)
|
||||||
@ -292,13 +290,13 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||||
GoogleUtils.newInstance(MainActivity.this).setFirebaseTokenListener(MainActivity.this, new GoogleUtils.FirebaseTokenListener() {
|
/* GoogleUtils.newInstance(MainActivity.this).setFirebaseTokenListener(MainActivity.this, new GoogleUtils.FirebaseTokenListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onResultToken(String token) {
|
public void onResultToken(String token) {
|
||||||
L.e("GoogleUtils.newInstance:onResultToken:" + token);
|
L.e("GoogleUtils.newInstance:onResultToken:" + token);
|
||||||
PushManager.getInstance().onReceiveToken(MainActivity.this, PushType.GOOGLE_FCM, token);
|
PushManager.getInstance().onReceiveToken(MainActivity.this, PushType.GOOGLE_FCM, token);
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
GoogleUtils.newInstance(MainActivity.this).initFireToken(MainActivity.this);
|
GoogleUtils.newInstance(MainActivity.this).initFireToken(MainActivity.this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,10 +99,9 @@ public class MyWalletActivity extends AbsActivity {
|
|||||||
try {
|
try {
|
||||||
int code = obj.getInt("querySize");
|
int code = obj.getInt("querySize");
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
loadingDialog.setShowText(getString(R.string.order_query_success));
|
payHandler.post(() -> loadingDialog.setHintText(getString(R.string.order_query_success)));
|
||||||
payHandler.postDelayed(() -> loadingDialog.dismiss(), 2000);
|
payHandler.postDelayed(() -> loadingDialog.dismiss(), 2000);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
JSONArray tokenList = obj.getJSONArray("tokenList");
|
JSONArray tokenList = obj.getJSONArray("tokenList");
|
||||||
JSONArray orderList = obj.getJSONArray("orderList");
|
JSONArray orderList = obj.getJSONArray("orderList");
|
||||||
String tradeNo = obj.getString("tradeNo");
|
String tradeNo = obj.getString("tradeNo");
|
||||||
@ -140,7 +139,7 @@ public class MyWalletActivity extends AbsActivity {
|
|||||||
googleUtils.queryPurchasesAsync();
|
googleUtils.queryPurchasesAsync();
|
||||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||||
hwBuilder.consume();
|
hwBuilder.consume();
|
||||||
loadingDialog.setShowText(getString(R.string.order_query_success));
|
payHandler.postDelayed(() -> loadingDialog.setHintText(getString(R.string.order_query_success)), 1000);
|
||||||
payHandler.postDelayed(() -> loadingDialog.dismiss(), 2000);
|
payHandler.postDelayed(() -> loadingDialog.dismiss(), 2000);
|
||||||
} else {
|
} else {
|
||||||
loadingDialog.setShowText(getString(R.string.order_query_success));
|
loadingDialog.setShowText(getString(R.string.order_query_success));
|
||||||
|
Loading…
Reference in New Issue
Block a user