Commit 4f804758 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 7d51ae40
......@@ -12,8 +12,8 @@ android {
applicationId "com.duben.xixiplaylet"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 18
versionName "1.1.7"
versionCode 20
versionName "2.0.0"
flavorDimensions "default"
// dex突破65535的限制
......@@ -120,7 +120,7 @@ android {
huawei {}
xiaomi {}
store360 {}
nuohe {}
facai_ks_qh_xixi_01 {}
}
productFlavors.all {
......
......@@ -5,6 +5,7 @@ import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.duben.xixiplaylet.utils.MateUtils;
import com.google.gson.JsonObject;
import com.duben.xixiplaylet.common.Constant;
import com.duben.xixiplaylet.manager.LocalVedioManager;
......@@ -95,6 +96,7 @@ public class TrackPresenter extends BaseTrackPresenter {
vo.put("appversion", deviceInfo.getVersionName());
vo.put("oaid", MintsApplication.OAID);
vo.put("imei", deviceInfo.getIMEI());
vo.put("isInstallAlipay", MateUtils.INSTANCE.isAliPayInstalled());
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
new BaseSubscriber<BaseResponse<Object>>() {
......
......@@ -382,4 +382,6 @@ public class CommonUtils {
}
return subList;
}
}
package com.duben.xixiplaylet.utils
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.net.Uri
import android.text.TextUtils
import com.duben.xixiplaylet.MintsApplication
object MateUtils {
/**
......@@ -31,4 +34,16 @@ object MateUtils {
}
return resultData
}
fun isAliPayInstalled(): Boolean {
try {
val uri: Uri = Uri.parse("alipays://platformapi/startApp")
val intent = Intent(Intent.ACTION_VIEW, uri)
val componentName = intent.resolveActivity(MintsApplication.getContext().getPackageManager())
return componentName != null
} catch (e: Exception) {
e.printStackTrace()
return false
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment