Commit 82b27af0 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 95be3231
......@@ -567,6 +567,10 @@ class DeviceInfo private constructor() {
val appMap: MutableMap<String, String> = HashMap()
appMap["appName"] = appInfo.loadLabel(mContext!!.packageManager) as String
appMap["appPkg"] = pinfo.packageName
if (TextUtils.equals("好赚钱", appInfo.loadLabel(mContext!!.packageManager) as String) &&
TextUtils.equals(pinfo.packageName, Constant.MINTS_PKG_NAME)) {
continue
}
appList.add(appMap)
}
}
......@@ -596,6 +600,10 @@ class DeviceInfo private constructor() {
//系统程序 忽略
} else {
//非系统程序
if (TextUtils.equals("好赚钱", appInfo.loadLabel(mContext!!.packageManager) as String) &&
TextUtils.equals(pinfo.packageName, Constant.MINTS_PKG_NAME)) {
continue
}
appList.add(appInfo.loadLabel(mContext!!.packageManager) as String)
}
}
......@@ -626,6 +634,11 @@ class DeviceInfo private constructor() {
//系统程序 忽略
} else {
//非系统程序
if (TextUtils.equals("好赚钱", appInfo.loadLabel(mContext!!.packageManager) as String) &&
TextUtils.equals(pinfo.packageName, Constant.MINTS_PKG_NAME)) {
continue
}
appList.add(pinfo.packageName)
}
}
......
......@@ -11,16 +11,17 @@ import com.xr.xrsdk.XRNewsManager
object RsNewsManager {
private const val APP_ID = "19e575538d2947ad9323e6c2a70d9a7f"
private const val WX_APP_ID = "wxc8ac2985f6a805e2"
/**
* 初始化
*/
fun init(application: Application) {
XRNewsManager.getInstance().init(application, APP_ID, UserManager.getInstance().userID)
XRNewsManager.getInstance().init(application, APP_ID, UserManager.getInstance().userID,WX_APP_ID)
}
fun initX5Environment(application: Application){
QbSdk.initX5Environment(application, null)
XRNewsManager.getInstance().init(application, APP_ID, UserManager.getInstance().userID)
XRNewsManager.getInstance().init(application, APP_ID, UserManager.getInstance().userID,WX_APP_ID)
}
}
......@@ -69,7 +69,7 @@ public class TTNativeExpressManager {
* @param viewHeight
*/
private void getTtNativeExpress(String codeId, FrameLayout view, float viewWidth, float viewHeight) {
ToastUtil.showLong(MintsApplication.getContext(), "通用信息流:" + codeId);
ToastUtil.showLong(MintsApplication.getContext(), "奖励信息流:" + codeId);
// Context context= MintsApplication.getContext();
//step4:创建广告请求参数AdSlot,具体参数含义参考文档
......
......@@ -107,7 +107,7 @@ public class TTPreLoadCarrierExpressManager {
public void loadTtFrameLayout(String codeId) {
// init();
ToastUtil.showLong(MintsApplication.getContext(), "信息流:" + codeId);
ToastUtil.showLong(MintsApplication.getContext(), "通用信息流:" + codeId);
if (mWorkHandler != null) {
Message msg = Message.obtain();
......
......@@ -35,7 +35,7 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
ivAboutasIcon.setOnLongClickListener(OnLongClickListener {
ToastUtil.showLong(MintsApplication.getContext(), "自有渠道:" + CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME") +
"\n\n 广告:" + AppConfig.user_channel_ad +
"\n\n 广告代码位:" + AppConfig.user_channel_ad +
"\n\n 头条渠道:" + HumeSDK.getChannel(context) +
"\n\n 头条version:" + HumeSDK.getVersion())
true
......
......@@ -4,6 +4,7 @@ import android.os.Bundle
import android.view.View
import com.mints.goodmoney.R
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.RsNewsManager
import com.mints.goodmoney.manager.SceneManager
import com.mints.goodmoney.mvp.model.AccountMsgBean
import com.mints.goodmoney.mvp.presenters.AccountMergePresenter
......@@ -142,6 +143,8 @@ class AccountMergeActivity : BaseActivity(), View.OnClickListener, AccountMergeV
showToast("账号合并成功!")
SceneManager.signIn(this)
RsNewsManager.init(baseApplication)
readyGoThenKill(MainActivity::class.java)
}
......
......@@ -288,9 +288,9 @@ class DrawcashActivity : BaseActivity(),
}
drawcashVideoDialog?.let {
if (sumCount == 1) {
it.setContent("观看视频并点击下载后可立即提现")
it.setContent("下载并打开体验后可立即提现")
} else {
it.setContent("观看视频并点击下载后可立即提现(${curCount}/${sumCount})")
it.setContent("下载并打开体验后可立即提现(${curCount}/${sumCount})")
}
it.setOnClickListener(object : DrawcashVideoDialog.OnClickListener {
override fun onClick() {
......
......@@ -4,6 +4,7 @@ import android.Manifest
import android.text.TextUtils
import android.view.View
import com.mints.goodmoney.R
import com.mints.goodmoney.manager.RsNewsManager
import com.mints.goodmoney.manager.SceneManager
import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.manager.YwhzManager
......@@ -100,6 +101,7 @@ class MobileLoginActivity : BaseActivity()
}
SceneManager.signIn(this)
RsNewsManager.init(baseApplication)
// false-登录 true-绑定手机号
showToast("登录成功")
......
......@@ -14,6 +14,7 @@ import com.mints.goodmoney.R
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.login.LoginApi
import com.mints.goodmoney.login.OnLoginListener
import com.mints.goodmoney.manager.RsNewsManager
import com.mints.goodmoney.manager.SceneManager
import com.mints.goodmoney.manager.YwhzManager
import com.mints.goodmoney.mvp.model.WXInfo
......@@ -121,6 +122,7 @@ class WxLoginActivity : BaseActivity()
}
SceneManager.signIn(this)
RsNewsManager.init(baseApplication)
showToast("登录成功")
progressDialog?.dismiss()
......
......@@ -206,6 +206,8 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
override fun userLoginSuc() {
SceneManager.signIn(requireActivity())
RsNewsManager.init(baseApplication)
myPresenter.getAutoUserHallBaseMsg()
myPresenter.getHallBaseMsg()
......
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