Commit 3fd6535b authored by mengcuiguang2's avatar mengcuiguang2

第一次上传设备信息添加是否有支付宝应用字段

parent 25e51219
...@@ -59,8 +59,7 @@ public class MintsApplication extends MultiDexApplication { ...@@ -59,8 +59,7 @@ public class MintsApplication extends MultiDexApplication {
// UmengManager.INSTANCE.preInit(this, // UmengManager.INSTANCE.preInit(this,
// MateUtils.INSTANCE.getAppMetaData(this, "CHANNEL_NAME")); // MateUtils.INSTANCE.getAppMetaData(this, "CHANNEL_NAME"));
// 判断应用是否在前台
ForegroundOrBackground.init(this);
// 三方配置 // 三方配置
thirdConfig(); thirdConfig();
...@@ -80,6 +79,8 @@ public class MintsApplication extends MultiDexApplication { ...@@ -80,6 +79,8 @@ public class MintsApplication extends MultiDexApplication {
if (AppPreferencesManager.INSTANCE.get() if (AppPreferencesManager.INSTANCE.get()
.getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) return; .getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) return;
// 判断应用是否在前台
ForegroundOrBackground.init(this);
initMiitHelper(); initMiitHelper();
...@@ -95,8 +96,8 @@ public class MintsApplication extends MultiDexApplication { ...@@ -95,8 +96,8 @@ public class MintsApplication extends MultiDexApplication {
//logger //logger
BindLogger(); BindLogger();
UmengManager.INSTANCE.initUm(this, // UmengManager.INSTANCE.initUm(this,
MateUtils.INSTANCE.getAppMetaData(this, "CHANNEL_NAME")); // MateUtils.INSTANCE.getAppMetaData(this, "CHANNEL_NAME"));
// bugly // bugly
CrashReport.initCrashReport(this, "d035276c5b", BuildConfig.DEBUG); CrashReport.initCrashReport(this, "d035276c5b", BuildConfig.DEBUG);
......
...@@ -34,10 +34,10 @@ object TalkingDataManager { ...@@ -34,10 +34,10 @@ object TalkingDataManager {
} }
fun onResume(cxt:Context,name:String){ fun onResume(cxt:Context,name:String){
TCAgent.onPageStart(cxt, name) // TCAgent.onPageStart(cxt, name)
} }
fun onPause(cxt:Context,name:String){ fun onPause(cxt:Context,name:String){
TCAgent.onPageEnd(cxt, name) // TCAgent.onPageEnd(cxt, name)
} }
} }
\ No newline at end of file
...@@ -42,11 +42,11 @@ object UmengManager { ...@@ -42,11 +42,11 @@ object UmengManager {
} }
fun onResume(context: Context) { fun onResume(context: Context) {
MobclickAgent.onResume(context) // MobclickAgent.onResume(context)
} }
fun onPause(context: Context) { fun onPause(context: Context) {
MobclickAgent.onPause(context) // MobclickAgent.onPause(context)
} }
} }
\ No newline at end of file
...@@ -5,6 +5,7 @@ import android.os.Handler; ...@@ -5,6 +5,7 @@ import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.util.Log; import android.util.Log;
import com.duben.xixiplaylet.utils.rxutil.CommonUtils;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.duben.xixiplaylet.common.Constant; import com.duben.xixiplaylet.common.Constant;
import com.duben.xixiplaylet.manager.LocalVedioManager; import com.duben.xixiplaylet.manager.LocalVedioManager;
...@@ -95,6 +96,8 @@ public class TrackPresenter extends BaseTrackPresenter { ...@@ -95,6 +96,8 @@ public class TrackPresenter extends BaseTrackPresenter {
vo.put("appversion", deviceInfo.getVersionName()); vo.put("appversion", deviceInfo.getVersionName());
vo.put("oaid", MintsApplication.OAID); vo.put("oaid", MintsApplication.OAID);
vo.put("imei", deviceInfo.getIMEI()); vo.put("imei", deviceInfo.getIMEI());
vo.put("isInstallAlipay", CommonUtils.INSTANCE.isAliPayInstalled());
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo), .call(loanService.saveTerminalInfo(vo),
new BaseSubscriber<BaseResponse<Object>>() { new BaseSubscriber<BaseResponse<Object>>() {
......
...@@ -12,6 +12,7 @@ import android.graphics.Bitmap ...@@ -12,6 +12,7 @@ import android.graphics.Bitmap
import android.graphics.Canvas import android.graphics.Canvas
import android.graphics.Rect import android.graphics.Rect
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.net.Uri
import android.os.Build import android.os.Build
import android.os.Looper import android.os.Looper
import android.util.DisplayMetrics import android.util.DisplayMetrics
...@@ -405,4 +406,22 @@ object CommonUtils { ...@@ -405,4 +406,22 @@ object CommonUtils {
val rand = random.nextInt(101) val rand = random.nextInt(101)
return rand in 1 until readInt return rand in 1 until readInt
} }
/**
* 检测是否安装支付宝
*
* true-安装支付宝
*/
fun isAliPayInstalled(): Boolean {
val context=MintsApplication.getContext()
try {
val uri: Uri = Uri.parse("alipays://platformapi/startApp")
val intent = Intent(Intent.ACTION_VIEW, uri)
val componentName = intent.resolveActivity(context.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