Commit 29fa5a30 authored by mengcuiguang's avatar mengcuiguang

合并代码,解决冲突

parents b891f0ab e7c63517
......@@ -287,7 +287,7 @@ dependencies {
implementation(name: 'tzsdk_core-3.0.0-20200807131516-release', ext: 'aar')
implementation(name: 'tzsdk_reporter-3.0.0-20200807131516-release', ext: 'aar')
// 快手
implementation(name: 'kssdk-ad-3.3.6-publishRelease', ext: 'aar')
implementation(name: 'kssdk-all--3.3.16-publishRelease-9ffe2b94e', ext: 'aar')
// 抖音滑动LayoutManager
implementation(name: 'LayoutManagerGroup', ext: 'aar')
// 蘑菇星球
......@@ -347,14 +347,16 @@ dependencies {
implementation 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:4.4.3'
api 'org.aspectj:aspectjrt:1.9.5'
//小满
implementation ("com.bx:adsdk:1.4.2.2"){
exclude group:"com.miit.sdk"
implementation("com.bx:adsdk:1.4.2.2") {
exclude group: "com.miit.sdk"
transitive = true
changing = true
}
//愉悦赚
implementation(name: 'mduisdk_v3.1.0.18_support_msa_1.0.23', ext: 'aar')
implementation 'com.tencent.tbs.tbssdk:sdk:43903'
// OneWay
implementation(name: 'oneway-common-core-1.0.10', ext: 'aar')
// //芒果联盟
// implementation 'com.openppeace.mgmob:mgmob:1.3.5-alpha6'//MGMob
......
......@@ -39,7 +39,7 @@
<uses-permission android:name="com.mints.goodmoney.permission" />
<!-- 蘑菇星球 -->
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES"/>
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<!--小满-->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
......@@ -166,8 +166,8 @@
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.MokuGuideActivity"
android:theme="@style/AppTheme.NoActionBarTranslucent"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBarTranslucent" />
<activity
android:name=".ui.activitys.SettingsActivity"
android:screenOrientation="portrait" />
......@@ -342,6 +342,21 @@
tools:replace="android:resource" />
</provider>
<!-- OneWay -->
<activity
android:name="mobi.oneway.export.AdShowActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<provider
android:name="mobi.oneway.export.OWProvider"
android:authorities="${applicationId}.OWProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/ow_file_paths" />
</provider>
<!-- 鱼丸盒子广告 -->
<provider
......
......@@ -16,7 +16,7 @@ import com.mints.goodmoney.manager.KsManager;
import com.mints.goodmoney.manager.LiebaoManager;
import com.mints.goodmoney.manager.MhManager;
import com.mints.goodmoney.manager.MiitHelper;
import com.mints.goodmoney.manager.ReaderManager;
import com.mints.goodmoney.manager.OwManager;
import com.mints.goodmoney.manager.RsNewsManager;
import com.mints.goodmoney.manager.TtCsjAdManager;
import com.mints.goodmoney.manager.TzManager;
......@@ -24,7 +24,6 @@ import com.mints.goodmoney.manager.WnManager;
import com.mints.goodmoney.manager.XmManager;
import com.mints.goodmoney.manager.YlVideoManager;
import com.mints.goodmoney.manager.YlhAdManager;
import com.mints.goodmoney.manager.YyzManager;
import com.mints.goodmoney.net.LoanService;
import com.mints.goodmoney.utils.ForegroundOrBackground;
import com.mints.goodmoney.utils.LogUtil;
......@@ -114,7 +113,7 @@ public class MintsApplication extends MultiDexApplication {
private void thirdConfig() {
// 友盟SDK预初始化函数
// preInit预初始化函数耗时极少,不会影响App首次冷启动用户体验
UMConfigure.preInit(this,CommonUtils.getAppMetaData(MintsApplication.getContext(), "UMENG_KEY"), CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME"));
UMConfigure.preInit(this, CommonUtils.getAppMetaData(MintsApplication.getContext(), "UMENG_KEY"), CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME"));
// 初始化toast
initToast();
......@@ -137,6 +136,9 @@ public class MintsApplication extends MultiDexApplication {
// 枫岚广告
MhManager.INSTANCE.initMn(this);
// OneWay
OwManager.INSTANCE.init(this);
// 天卓珊瑚[INSTANCE是设置单例模式]
TzManager.INSTANCE.initTz(this);
......
package com.mints.goodmoney.ad.express
import android.annotation.SuppressLint
import android.content.DialogInterface
import android.text.TextUtils
import android.util.Log
import android.view.LayoutInflater
......@@ -95,7 +96,7 @@ object KsPreLoadExpressManager {
}
override fun onVideoPlayError(what: Int, extra: Int) {
LogUtil.d("KsPreLoadExpressManager","id=${what} extra=${extra}")
LogUtil.d("KsPreLoadExpressManager", "id=${what} extra=${extra}")
}
})
......@@ -191,6 +192,10 @@ object KsPreLoadExpressManager {
// Toast.makeText(mContext, "广告" + ad.appName + "展示", Toast.LENGTH_SHORT).show()
}
}
override fun handleDownloadDialog(p0: DialogInterface.OnClickListener?): Boolean {
return false
}
})
// 广告描述
......
......@@ -120,6 +120,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
}
}
override fun onRequestResult(p0: Int) {}
})
......
package com.mints.goodmoney.ad.video
import android.app.Activity
import com.mints.goodmoney.ad.video.base.BaseVideoAd
import com.mints.goodmoney.ad.video.base.VideoAdStatusListener
import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.OwManager
import com.mints.goodmoney.manager.TrackManager
import mobi.oneway.export.Ad.OWRewardedAd
import mobi.oneway.export.AdListener.OWRewardedAdListener
import mobi.oneway.export.enums.OnewayAdCloseType
import mobi.oneway.export.enums.OnewaySdkError
private val TAG = OwVideoAdManager::class.java.simpleName
/**
* OneWay广告视频
*/
class OwVideoAdManager private constructor() :
BaseVideoAd() {
private var videoAdStatusListener: VideoAdStatusListener? = null
private var owRewardedAd: OWRewardedAd? = null
private var isClickScreen: Boolean = true
companion object {
private var _inst: OwVideoAdManager? = null
fun getInstance(): OwVideoAdManager? {
return if (_inst != null) {
_inst
} else {
_inst = OwVideoAdManager()
_inst
}
}
}
override fun loadAd(activity: Activity, curCoin: Int, carrierType: String, extraId: String?) {
isClickScreen = true
//创建激励视频事件监听器
val owRewardedAdListener: OWRewardedAdListener = object : OWRewardedAdListener {
override fun onAdReady() {
owRewardedAd?.show(activity)
}
override fun onAdShow(tag: String) {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_OW, Constant.EVENT_TYPE_ZERO, "", "")
}
override fun onAdClick(tag: String) {
if (AppConfig.needReportClickAdEvent) {
TrackManager.getInstance().reportClickAdEvent()
}
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_OW, Constant.EVENT_TYPE_TWO, "", "")
if (isClickScreen) {
// 防止重复
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_OW, Constant.EVENT_TYPE_FOUR, "", "")
isClickScreen = false
}
videoAdStatusListener?.adDownload()
}
override fun onAdClose(tag: String, onewayVideoCloseType: OnewayAdCloseType) {
TrackManager.getInstance().reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_OW, extraId, curCoin))
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_OW, Constant.EVENT_TYPE_THREE, "", "")
videoAdStatusListener?.adSuccess()
}
override fun onAdFinish(s: String, onewayAdCloseType: OnewayAdCloseType, s1: String) {
}
override fun onSdkError(onewaySdkError: OnewaySdkError, msg: String) {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_OW, Constant.EVENT_TYPE_ONE, "999999", "emun:" + onewaySdkError.name + "msg:" + msg)
videoAdStatusListener?.adFail()
}
}
//创建激励视频对象
owRewardedAd = OWRewardedAd(activity, OwManager.REWARD_PID, owRewardedAdListener)
owRewardedAd?.loadAd()
}
fun setVideoAdStatusListener(videoAdStatusListener: VideoAdStatusListener?) {
this.videoAdStatusListener = videoAdStatusListener
}
override fun onDestroy() {
owRewardedAd?.destory()
owRewardedAd = null
}
}
\ No newline at end of file
......@@ -97,9 +97,28 @@ public class AppConfig {
*/
public static int ksVideoAdCount = 0;
/**
* rtaVideo 剩余广告播放数
* owVideo 剩余广告播放数
*/
public static int rtaVideoAdCount = 0;
public static int owVideoAdCount = 0;
// /**
// * rtaVideo 剩余广告播放数
// */
// public static int rtaVideoAdCount = 0;
/**
* 高额任务和超级翻倍 csjVideo 剩余广告播放数
*/
public static int csjHighVideoAdCount = 0;
/**
* 高额任务和超级翻倍 ylhVideo 剩余广告播放数
*/
public static int ylhHighVideoAdCount = 0;
/**
* 高额任务和超级翻倍 ksVideo 剩余广告播放数
*/
public static int ksHighVideoAdCount = 0;
/**
* 高额试玩任务标识
......
......@@ -157,6 +157,7 @@ object Constant {
const val AD_SOURCE_SH = "CORAL" //珊瑚天卓
const val AD_SOURCE_KS = "KS" //快手
const val AD_SOURCE_RTA = "RTA" //RTA
const val AD_SOURCE_OW = "OW" //OneWay
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
const val EVENT_TYPE_ZERO = "0"
......@@ -179,6 +180,8 @@ object Constant {
const val SH_VEDIO_AD = "SH_VEDIO_AD"
const val KS_VEDIO_AD = "KS_VEDIO_AD"
const val RTA_VEDIO_AD = "RTA_VEDIO_AD"
const val OW_VEDIO_AD = "OW_VEDIO_AD"
// 信息流广告类型
const val CSJ_EXPRESS_AD = "CSJ_EXPRESS_AD"
......
......@@ -23,6 +23,9 @@ object KsManager {
/* vedio-postid */
const val KS_AD_VEDIO_POSTID = 5746000022
/* 内容联盟id */
const val KS_CONTENT_POSTID = 5746000049
/**
* 初始化
*/
......
package com.mints.goodmoney.manager
import android.app.Application
import mobi.oneway.export.Ad.OnewaySdk
/**
* 描述:OneWay激励视频
* 作者:孟崔广
*/
object OwManager {
private const val PUBLISH_ID = "bf236dc4c17946cd"
const val REWARD_PID = "P9663XII5Q9VJM25"
/**
* 初始化
*/
fun init(application: Application) {
OnewaySdk.configure(application, PUBLISH_ID)
OnewaySdk.setDebugMode(true)
}
}
\ No newline at end of file
......@@ -27,7 +27,7 @@ object UserWeight {
data.vedioRules.corAl_VIDEO.rate,
data.vedioRules.csjfulL_VEDIO.rate,
data.vedioRules.kS_VEDIO.rate,
data.vedioRules.rtA_VEDIO.rate
data.vedioRules.oW_VEDIO.rate
)
LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} " +
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} " +
......@@ -35,7 +35,7 @@ object UserWeight {
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} " +
"shWeight:${data.vedioRules.corAl_VIDEO.rate} " +
"flWeight:${data.vedioRules.fL_VEDIO.rate} " +
"rtaWeight:${data.vedioRules.rtA_VEDIO.rate} " +
"owWeight:${data.vedioRules.oW_VEDIO.rate} " +
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
)
// 广告视频数
......@@ -45,7 +45,7 @@ object UserWeight {
AppConfig.flVideoAdCount = data.vedioRules.fL_VEDIO.surplus
AppConfig.shVideoAdCount = data.vedioRules.corAl_VIDEO.surplus
AppConfig.ksVideoAdCount = data.vedioRules.kS_VEDIO.surplus
AppConfig.rtaVideoAdCount = data.vedioRules.rtA_VEDIO.surplus
AppConfig.owVideoAdCount = data.vedioRules.oW_VEDIO.surplus
AppConfig.csjFullVideoAdCount = data.vedioRules.csjfulL_VEDIO.surplus
LogUtil.d(TAG, "首页视频数:csjCount:${AppConfig.csjVideoAdCount} " +
"ylhCount:${AppConfig.ylhAdCount} " +
......@@ -53,7 +53,7 @@ object UserWeight {
"csjFullCount:${AppConfig.csjFullVideoAdCount} " +
"shCount:${AppConfig.shVideoAdCount} " +
"flCount:${AppConfig.flVideoAdCount} " +
"rtaCount:${AppConfig.rtaVideoAdCount} " +
"owCount:${AppConfig.owVideoAdCount} " +
"ksCount:${AppConfig.ksVideoAdCount}"
)
}
......
......@@ -89,6 +89,7 @@ public class DrawcashBean implements Serializable {
private int CORAL_VEDIO;
private int KS_VEDIO;
private int RTA_VEDIO;
private int OW_VEDIO;
public int getRTA_VEDIO() {
return RTA_VEDIO;
......@@ -125,6 +126,10 @@ public class DrawcashBean implements Serializable {
public int getKS_VEDIO() {
return KS_VEDIO;
}
public int getOW_VEDIO() {
return OW_VEDIO;
}
}
public class CashOutMoneyArrBean implements Serializable {
......
......@@ -13,6 +13,7 @@ public class UserTaskMsgBean implements Serializable {
private UserRiskAppsBean userRiskApps;
private AdcodeBean adcode_v1 = null;
private FlowAdRulesBean flowAdRules;
private HighRatePlanBean highRatePlan;
private String ip;
private String channel;
......@@ -135,4 +136,30 @@ public class UserTaskMsgBean implements Serializable {
public FlowAdRulesBean getFlowAdRules() {
return flowAdRules;
}
public HighRatePlanBean getHighRatePlan() {
return highRatePlan;
}
public void setHighRatePlan(HighRatePlanBean highRatePlan) {
this.highRatePlan = highRatePlan;
}
public static class HighRatePlanBean implements Serializable {
private int YLH;
private int KS;
private int CSJ;
public int getYLH() {
return YLH;
}
public int getKS() {
return KS;
}
public int getCSJ() {
return CSJ;
}
}
}
......@@ -12,6 +12,7 @@ public class VedioRulesBean implements Serializable {
private CORALVedioBean CORAL_VEDIO;
private KSVedioBean KS_VEDIO;
private RTAVedioBean RTA_VEDIO;
private OWVedioBean OW_VEDIO;
private boolean flVideoFlag;
private boolean vedioSleep;
......@@ -145,6 +146,23 @@ public class VedioRulesBean implements Serializable {
return RTA_VEDIO;
}
public OWVedioBean getOW_VEDIO() {
return OW_VEDIO;
}
public class OWVedioBean implements Serializable {
private int surplus;
private int rate;
public int getSurplus() {
return surplus;
}
public int getRate() {
return rate;
}
}
public void setRTA_VEDIO(RTAVedioBean RTA_VEDIO) {
this.RTA_VEDIO = RTA_VEDIO;
}
......
......@@ -108,6 +108,7 @@ public class AwardPresenter extends BasePresenter<AwardView> {
if (!TextUtils.isEmpty(MintsApplication.OAID)) {
vo.put("oaid", MintsApplication.OAID);
}
vo.put("ua", deviceInfo.getUserAgent());
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
new BaseSubscriber<BaseResponse<UserBean>>() {
......
......@@ -153,7 +153,7 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
if (!TextUtils.isEmpty(MintsApplication.OAID)) {
vo.put("oaid", MintsApplication.OAID);
}
vo.put("ua", deviceInfo.getUserAgent());
TrackManager.getInstance().riskinfo();
AppHttpManager.getInstance(loanApplication)
......
......@@ -41,6 +41,7 @@ class HomePresenter : BasePresenter<HomeView>() {
vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["ua"] = deviceInfo.userAgent.toString()
AppHttpManager.getInstance(loanApplication)
.call(loanService.comSaveTerminalInfo(vo),
......@@ -176,6 +177,7 @@ class HomePresenter : BasePresenter<HomeView>() {
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().getShumeiDeviceId()
vo["ua"] = deviceInfo.userAgent.toString()
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
......@@ -247,7 +247,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().getShumeiDeviceId()
vo["appPkgList"] = t.toString()
vo["ua"] = deviceInfo.userAgent.toString()
TrackManager.getInstance().riskinfo()
AppHttpManager.getInstance(loanApplication)
......
......@@ -200,6 +200,7 @@ open class MyPresenter : BasePresenter<MyView>() {
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().shumeiDeviceId
vo["ua"] = deviceInfo.userAgent.toString()
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
......@@ -72,6 +72,7 @@ class PanPresenter : BasePresenter<PanView>() {
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().getShumeiDeviceId()
vo["ua"] = deviceInfo.userAgent.toString()
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
......@@ -185,6 +185,7 @@ class TurnTablePresenter : BasePresenter<TurnTableView>() {
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().getShumeiDeviceId()
vo["ua"] = deviceInfo.userAgent.toString()
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
......
......@@ -425,6 +425,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 是否开启应用使用情况权限
if (AppUtil.isOpenUsageStats()) {
registerBroad()
videoAdingManager.setIsHighWeight(true)
awardVideo()
} else {
AppTryPlayManager.openAppUsageStats(this)
......
......@@ -313,7 +313,7 @@ class DrawcashActivity : BaseActivity(),
data.coraL_VEDIO,
data.csjfulL_VEDIO,
data.kS_VEDIO,
data.rtA_VEDIO
data.oW_VEDIO
)
LogUtil.d(TAG, "提现权重值:csjWeight:${data.csJ_VEDIO} " +
"ylhWeight:${data.ylH_VEDIO} " +
......@@ -321,7 +321,7 @@ class DrawcashActivity : BaseActivity(),
"csjFullWeight:${data.csjfulL_VEDIO} " +
"shWeight:${data.coraL_VEDIO} " +
"flWeight:${data.fL_VEDIO} " +
"rtaWeight:${data.rtA_VEDIO} " +
"owWeight:${data.oW_VEDIO} " +
"ksWeight:${data.kS_VEDIO}"
)
// 广告视频数
......
......@@ -29,6 +29,7 @@ class SplashKsADActivity : BaseActivity() {
* 记录拉取广告的时间
*/
private val handler = Handler(Looper.getMainLooper())
override fun getContentViewLayoutID(): Int {
return R.layout.activity_splash_ylh
}
......@@ -100,6 +101,8 @@ class SplashKsADActivity : BaseActivity() {
next()
}
override fun onRequestResult(p0: Int) {}
override fun onSplashScreenAdLoad(p0: KsSplashScreenAd?) {
LogUtil.d(TAG, "onSplashScreenAdLoad")
......
......@@ -4,12 +4,9 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction
import com.androidkun.xtablayout.XTabLayout
import com.chineseall.reader17ksdk.feature.main.bookshop.wellchosen.WellChosenFragment
import com.mints.goodmoney.R
import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.utils.LogUtil
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.android.synthetic.main.fragment_main_money.*
/**
......@@ -68,7 +65,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
if (AppConfig.showAdFlag) {
if (mainFragment == null) {
mainFragment = MainFragment()
LogUtil.d("mainFragment","mainFragment是空的。。。。。。。。。。。。。。。。。。")
}
if (!mainFragment!!.isAdded) {
// 提交事务
......
......@@ -50,6 +50,7 @@ import com.rd.animation.type.AnimationType
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import com.tbruyelle.rxpermissions.RxPermissions
import com.umeng.analytics.MobclickAgent
import kotlinx.android.synthetic.main.fragment_main_my.*
import kotlinx.android.synthetic.main.header_layout.*
import kotlinx.android.synthetic.main.item_fragment_main_my_clock.*
......@@ -141,6 +142,10 @@ class MyFragment : BaseFragment(),
override fun onPause() {
super.onPause()
MobclickAgent.onPageEnd(this::class.java.simpleName)
MobclickAgent.onPause(mContext)
banner_view.stopAutoScroll()
item_clock_signview.stopRedbox()
......@@ -149,6 +154,11 @@ class MyFragment : BaseFragment(),
override fun onResume() {
super.onResume()
MobclickAgent.onPageStart(this::class.java.simpleName)
MobclickAgent.onResume(mContext)
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FIVE) {
// 防止首次加载两次
if (AntiShake.check(item_title_id?.id)) return
......@@ -324,6 +334,13 @@ class MyFragment : BaseFragment(),
return
}
// 高额任务及超级翻倍次数
if (data.highRatePlan != null) {
AppConfig.csjHighVideoAdCount = data.highRatePlan.csj
AppConfig.ylhHighVideoAdCount = data.highRatePlan.ylh
AppConfig.ksHighVideoAdCount = data.highRatePlan.ks
}
if (data.shareNews != null) {
AppConfig.wzReadCoin = data.shareNews.readCoin
}
......@@ -360,7 +377,6 @@ class MyFragment : BaseFragment(),
}
}
/**
* 跳转到微信搜索页面
*/
......@@ -512,7 +528,7 @@ class MyFragment : BaseFragment(),
private fun setUserLoginStatus() {
if (userManager.userIsLogin()) {
LogUtil.d("lixianshouyi","setUserLoginStatus。。。。。。。。。。。。。。。。。。。。。。。。。。")
LogUtil.d("lixianshouyi", "setUserLoginStatus。。。。。。。。。。。。。。。。。。。。。。。。。。")
// 已登录
if (userManager.wxOpenid.isNotEmpty()) {
GlideUtils.loadImageViewLoding(context, userManager.wxHeader, item_title_avatar, R.mipmap.ic_my, R.mipmap.ic_my)
......@@ -870,6 +886,8 @@ class MyFragment : BaseFragment(),
if (taskBean.otherConfig != null) {
when (taskBean.otherConfig.status) {
0 -> {
pushUmengEvent(MainMyAdapter.TO_DOWNLOADS)
pkgMCRSCarrier = Constant.CARRIER_FIRSTDOWNLOADS
pkgMCRSKey = taskBean.otherConfig.key
pkgMCRSName = taskBean.otherConfig.pkg
......@@ -905,6 +923,16 @@ class MyFragment : BaseFragment(),
}
}
/**
* 推送umeng事件埋点
*/
private fun pushUmengEvent(carrierType: String) {
// 埋点上送事件
val map = mutableMapOf<String, String>()
map["userId"] = UserManager.getInstance().userID
MobclickAgent.onEvent(mContext, carrierType, map)
}
//点击事件
override fun onClick(v: View?) {
if (AntiShake.check(view?.id)) return
......@@ -1195,7 +1223,7 @@ class MyFragment : BaseFragment(),
* 激励视频播放成功回调
*/
private fun videoAdingSuccess(adType: String) {
if (activity != null && !activity!!.isFinishing) {
if (activity != null && !requireActivity().isFinishing) {
// 高额任务
if (TextUtils.equals(carrierType, Constant.CARRIER_HIGH_ACTIVITY)) {
return
......@@ -1229,10 +1257,10 @@ class MyFragment : BaseFragment(),
private fun initManager() {
BannerManager.init()
videoAdingManager = VideoAdingManager.getInstance(activity)
LogUtil.d("lixianshouyi","进入到initManager。。。。。。。。。。。。。。。。。。。。。。。。。。")
LogUtil.d("lixianshouyi", "进入到initManager。。。。。。。。。。。。。。。。。。。。。。。。。。")
//登录成功
if (!TextUtils.isEmpty(userManager.userID)) {
LogUtil.d("lixianshouyi","用户登陆成功!!!。。。。。。。。。。。。。。。。。。。。。。。。。。")
LogUtil.d("lixianshouyi", "用户登陆成功!!!。。。。。。。。。。。。。。。。。。。。。。。。。。")
// 登录成功的用户初始化鱼丸盒子
if (userManager.userIsLogin()) {
YwhzManager.init(baseApplication)
......
package com.mints.goodmoney.ui.widgets.dialog
import com.mints.goodmoney.R
import com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import com.mints.goodmoney.utils.SpanUtils
import android.app.Dialog
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.graphics.Paint
import android.text.Html
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.ImageView
import android.widget.TextView
import com.mints.goodmoney.R
import com.mints.library.utils.nodoubleclick.AntiShake
/**
* 关注公众号
*/
class GzhDialog(context: Context, private val listener: DialogListener) :
Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams
......@@ -42,12 +43,25 @@ class GzhDialog(context: Context, private val listener: DialogListener) :
tv_focus = findViewById(R.id.tv_focus)
tv_subscribe = findViewById(R.id.tv_subscribe)
iv_Close = findViewById(R.id.iv_Close)
//设置文字底部下划线,不同android系统显示效果不同,未使用
// tv_subscribe.paint.setFlags(Paint.UNDERLINE_TEXT_FLAG)
// tv_subscribe.paint.setAntiAlias(true)//抗锯齿
tv_focus.setOnClickListener(listener)
tv_subscribe.setOnClickListener(listener)
iv_Close.setOnClickListener(listener)
val ssb = SpanUtils()
.append("关注官方公众号")
.append("[淘金空间]\n").setFontSize(BubbleUtils.dp2px(20)).setBold()
.append("您可以第一时间了解到")
.create()
findViewById<TextView>(R.id.tv_1).text = ssb
tv_subscribe.text = Html.fromHtml("<u>我已订阅</u>")
tv_focus.setOnClickListener {
listener.onClick(it)
}
tv_subscribe.setOnClickListener {
listener.onClick(it)
}
iv_Close.setOnClickListener {
listener.onClick(it)
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@mipmap/bg_gzh"
android:orientation="vertical">
android:background="@mipmap/bg_gzh">
<ImageView
android:id="@+id/iv_Close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginTop="35dp"
android:layout_marginRight="10dp"
android:src="@mipmap/iv_close_gzh" />
android:layout_gravity="top|end"
android:layout_marginTop="50dp"
android:layout_marginEnd="10dp"
android:padding="6dp"
android:src="@mipmap/ic_close" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/tv_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="186dp"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:text="参与最新赚钱活动、获取提现福利、VIP客服反馈..."
android:textColor="@color/black"
android:layout_marginBottom="10dp"
android:gravity="center"
android:textSize="14sp" />
android:lineHeight="20dp"
android:textColor="@color/color_FF9837"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:text="更多惊喜等你来看!"
android:textColor="@color/black"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="20dp"
android:gravity="center"
android:textSize="14sp" />
android:lineHeight="20dp"
android:text="最新赚钱活动,领取提现福利,VIP客服反馈...\n更多惊喜等你来看!"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_focus"
android:layout_width="200dp"
android:layout_height="36dp"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20dp"
android:layout_marginTop="36dp"
android:layout_marginRight="20dp"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="10dp"
android:background="@mipmap/bg_btn_gzh"
android:background="@drawable/shape_main"
android:gravity="center"
android:text="马上关注"
android:textColor="@color/white" />
......@@ -62,19 +60,10 @@
android:id="@+id/tv_subscribe"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:gravity="center"
android:text="我已订阅"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="10dp"
android:textColor="@color/black" />
<View
android:layout_width="55dp"
android:layout_height="1px"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="60dp"
android:background="@color/black" />
</LinearLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</RelativeLayout>
\ No newline at end of file
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<paths>
<root-path
name="root"
path="" />
<files-path
name="files"
path="" />
<external-path
name="sdcard"
path="" />
<cache-path
name="cache"
path="" />
<external-files-path
name="exFiles"
path="" />
<external-cache-path
name="exCache"
path="" />
</paths>
</resources>
\ 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