Commit d1afdecf authored by xw's avatar xw

[提交人]:王雪伟

[提交简述] :多多菜园1.0.9
[实现方案] :升级广告,删除多余toast
parent 07f5e611
......@@ -43,7 +43,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
private val mContext = AppliContext.get()
private var mRefreshLoginObservable: Observable<String>? = null
private var mXiaoManPlaceMateId = 0;//素材ID
private var mDFWType = 1;//大富翁type
@SuppressLint("CheckResult")
override fun onCreate(savedInstanceState: Bundle?) {
......@@ -84,7 +83,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
})
// xiaoManInit()
openNotif()
AdUtils.loadNextCacheRewardVideoAd(this)
AdUtils.loadFeedCacheAdToCache(this)
}
......@@ -92,7 +90,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
private fun xiaoManInit(json: NewLandListEntity) {
val client = OkHttpClient()
val request: Request = Request.Builder()
.url("https://saas.hixiaoman.com/placeEnter?appKey=ddcy-az-hdgj_vbskkc&placeId=2773")
.url("https://saas.hixiaoman.com/placeEnter?appKey=ddcy-az-hdgj_vbskkc&placeId=2912")
.build()
val call: Call = client.newCall(request)
call.enqueue(object : Callback {
......@@ -103,6 +101,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
}
override fun onResponse(call: Call, response: Response) {
Log.d("wxw","xiaomanUrl")
if (response.isSuccessful) {
val result = response.body()?.string()
runOnUiThread {
......@@ -111,12 +110,13 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
Utils.str2Obj(result, XiaoManEntity::class.java) as XiaoManEntity
if (xiaoMan.code == "0") {
mXiaoManPlaceMateId = xiaoMan.data.placeMaterialId
json.xiaoManPath=xiaoMan.data.materialPath
json.xiaoManPath = xiaoMan.data.materialPath
Log.d("wxw","xiaomanUrl"+ json.xiaoManPath)
//小满上报
if (MyConstant.isReportXiaoman) {
runOnUiThread {
AdSdk.exposure(
"2773",
"2912",
AdPreference.getToken(),
mXiaoManPlaceMateId.toString()
)
......@@ -127,7 +127,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
}
callUnity("Canvas", "loadLoadingLandListSuccess", Utils.obj2Str(json))
}
}else{
} else {
callUnity("Canvas", "loadLoadingLandListSuccess", Utils.obj2Str(json))
}
}
......@@ -210,7 +210,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
*/
fun gotoXiaoManActivity() {
EventUtils.onEvent("XiaoManClick", "小满入口点击");
AdSdk.click("2773", AdPreference.getToken(), mXiaoManPlaceMateId.toString())
AdSdk.click("2912", AdPreference.getToken(), mXiaoManPlaceMateId.toString())
JumpUtils.jumpXiaomanActivity("天天领现金")
}
......@@ -253,11 +253,12 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
* 大富翁
*/
fun onMonopolyClick() {
EventUtils.onEvent("dfw_click", "大富翁入口点击");
MainLooper.get()?.post(Runnable {
if (Utils.isFastClick2()) {
JumpUtils.h5NormalJump(
"大富翁",
NetConfig.H5.CONFIRMURL + "?is_popup1=" + mDFWType,
NetConfig.H5.CONFIRMURL + "?is_popup1=" + NetConfig.H5.mDFWType,
false,
act
)
......@@ -383,7 +384,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
.subscribe(object : BaseObserver<HomeInfoEntity>() {
override fun onSuccess(result: HomeInfoEntity?) {
if (result != null) {
mDFWType = result.isPopup;
NetConfig.H5.mDFWType = result.isPopup;
}
callback?.onHomeSuccess(true, Utils.obj2Str(result))
}
......@@ -825,14 +826,11 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
//看视频领取种子 本地处理 新
fun getVideoSeedReceiveNew(id: Int, time: Int) {
if (videoSeedClick) {
videoSeedClick = false
AdUtils.playRewardAd(
this@GameActivity,
"receive_seed_click",
object : IAdVideoListener {
override fun onAdClose() {
videoSeedClick = true
GameApiClient.gameApi.getVideoSeedReceive(id, time)
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<StatusEntity>() {
......@@ -854,11 +852,9 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
}
override fun onError(errorMsg: String?) {
videoSeedClick = true
}
})
}
}
var videoJiasuClick = true
......
......@@ -177,5 +177,6 @@ class SplashActivity : MyBaseActivity(), SplashContract.View {
super.onPause()
EventUtils.onEvent("page_status", Utils.obj2Str(ReportEntity(MyConstant.ReportSessionId, "SplashActivity", "onPause")))
MobclickAgent.onPause(this)
}
}
\ No newline at end of file
......@@ -18,6 +18,7 @@ import com.umeng.commonsdk.UMConfigure
import com.umeng.socialize.PlatformConfig
import com.ym.admodule.config.AdManager
import com.ym.library.MyConstant
import com.ym.modulecommon.AppLibraryConfig
import com.ym.modulecommon.AppliContext
import com.ym.modulecommon.base.BaseApplication
import com.ym.modulecommon.base.SplashResumeActivity
......@@ -48,30 +49,33 @@ class BaseApplication : BaseApplication() {
// 从前台进入后台的时间
private var frontToBackTime: Long = 0
// 从后台返回前台的时间
private var backToFrontTime: Long = 0
override fun onCreate() {
super.onCreate()
NetConfig.setBase_Url(NetConfig.Environment.DEV)// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
// NetConfig.BASE_FEED_URL="https://fsapi.ihuomao.com/"
// NetConfig.BASE_AD_URL="https://bs.ihuomao.com/"
// NetConfig.URL_REPORT_BASE="http://report.ihuomao.com/"
NetConfig.setBase_Url(NetConfig.Environment.PRODUCT)// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
var isDebug = true
if (NetConfig.sEnvironment == NetConfig.Environment.PRODUCT) {
isDebug = false
NetConfig.BASE_FEED_URL = "https://fsapi.ihuomao.com/"
NetConfig.BASE_AD_URL = "https://bs.ihuomao.com/"
NetConfig.URL_REPORT_BASE = "http://report.ihuomao.com/"
} else {
//TODO 上线去掉测试地址
NetConfig.BASE_FEED_URL = "http://feedapitest2.zhangxinhulian.com/"
}
LogUtils.d("BaseApplication","isDebug:${isDebug}")
LogUtils.getConfig().logSwitch = isDebug
AppLibraryConfig.NetConfig.isDebug = isDebug
// Constant.appLs = "afcbef40e31631d3"//appls
AdManager.init(this,"afcbef40e31631d3")
LogUtils.getConfig().logSwitch = false
AdManager.init(this, "afcbef40e31631d3")
UMConfigure.setLogEnabled(false)
UMConfigure.init(this, "5f9bb48945b2b751a91fb2d5", "", UMConfigure.DEVICE_TYPE_PHONE, "")
PlatformConfig.setWeixin(MyConstant.WX_APPID, MyConstant.WX_APPKEY)
var isDebug = true
if (NetConfig.sEnvironment == NetConfig.Environment.PRODUCT) {
isDebug = false
}
//========== Bugly ==========
val strategy = CrashReport.UserStrategy(this)
......@@ -96,6 +100,7 @@ class BaseApplication : BaseApplication() {
super.attachBaseContext(base)
MultiDex.install(base)
}
/**
* 当前Activity个数
*/
......@@ -110,9 +115,9 @@ class BaseApplication : BaseApplication() {
flag = false
sAppState = STATE_BACK_TO_FRONT
backToFrontTime = System.currentTimeMillis()
if(canShowAd()){
if (canShowAd()) {
var intent = Intent()
intent.setClass(applicationContext,SplashResumeActivity::class.java)
intent.setClass(applicationContext, SplashResumeActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
AppliContext.get().startActivity(intent)
}
......@@ -123,6 +128,7 @@ class BaseApplication : BaseApplication() {
activityCount++
}
override fun onActivityResumed(activity: Activity) {}
override fun onActivityPaused(activity: Activity) {}
override fun onActivityStopped(activity: Activity) {
......@@ -136,6 +142,7 @@ class BaseApplication : BaseApplication() {
sAppState = STATE_NORMAL;
}
}
override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) {}
override fun onActivityDestroyed(activity: Activity) {}
}
......@@ -144,6 +151,7 @@ class BaseApplication : BaseApplication() {
return sAppState === STATE_BACK_TO_FRONT &&
backToFrontTime - frontToBackTime > 10000
}
fun isCurAppTop(context: Context?): Boolean {
if (context == null) {
return false
......@@ -162,6 +170,7 @@ class BaseApplication : BaseApplication() {
}
return false
}
/**
* 获取进程号对应的进程名
*
......
......@@ -41,14 +41,14 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
private var singinDropsAdapter: SigninDropsAdapter? = null
private var wateringTaskAdpater: WateringTaskAdpater? = null
var tv_tomAwardNum:TextView?=null
var tv_tomAwardNum: TextView? = null
fun init(mContext: Activity?, mListener: IDialogViewCloseCallback) {
this.mListener = mListener
this.mContext = mContext
if (mContext==null){
if (mContext == null) {
return
}
if (mContext.isFinishing){
if (mContext.isFinishing) {
return
}
// ToponManager.initNativeAd((mContext as Activity), AdID.AD_DAILY_DRIP_BIGIMAGE)
......@@ -73,7 +73,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
private fun initView() {
tvPopupSigninDrops = view?.findViewById<TextView>(R.id.tv_popup_signin_drops)
tv_tomAwardNum=view?.findViewById(R.id.id_tv_reward_coin)
tv_tomAwardNum = view?.findViewById(R.id.id_tv_reward_coin)
val recyclerSigninDrops =
view?.findViewById<RecyclerView>(R.id.recycler_popup_signin_drops)
val recyclerWatering =
......@@ -83,7 +83,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
singinDropsAdapter = SigninDropsAdapter(mContext)
recyclerSigninDrops?.layoutManager =
GridLayoutManager(mContext,7)
GridLayoutManager(mContext, 7)
// recyclerSigninDrops?.layoutManager = CardLayoutManager()
recyclerSigninDrops?.adapter = singinDropsAdapter
......@@ -128,12 +128,11 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
// EventUtils.onEvent("welfare_task_undone_click", "${data.sid}")
showAd(data.sid)
EventUtils.onEvent("renwu_undone_click_total")
}
else {
} else {
JumpUtils.adJump(data, mContext)
}
}else if(data.opentype==2){
} else if (data.opentype == 2) {
//直客链接
JumpUtils.adJump(data, (mContext as Activity))
}
......@@ -175,18 +174,19 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
}
}
}
fun showAd(sId: Int) {
fun showAd(sId: Int) {
AdUtils.playRewardAd(mContext as Activity, "home_task", object : IAdVideoListener {
override fun onAdClose() {
// mPresenter?.getTaskComplete(sId)
wateringTaskAdpater?.getDripTaskReceive(1,sId)
wateringTaskAdpater?.getDripTaskReceive(1, sId)
}
override fun onError(errorMsg: String?) {
}
})
}
}
//签到
......@@ -198,7 +198,7 @@ fun showAd(sId: Int) {
singinDropsAdapter?.clear()
singinDropsAdapter?.appendToList(data.signInfoList)
singinDropsAdapter?.notifyDataSetChanged()
tv_tomAwardNum?.text="${data.tomAwardNum}"
tv_tomAwardNum?.text = "${data.tomAwardNum}"
if (data.isPop == 1) {
//首次签到弹窗
MainDialog.showgetWaterDrop(mContext, 4, "singin", data.awardNum, null)
......
......@@ -67,59 +67,9 @@ dependencies {
api ("com.bx:adsdk:1.3.7"){
exclude group: 'com.google.code.gson'
}
api 'com.ym.admodule:admodule:1.0.3.3'
api 'com.ym.admodule:admodule:1.0.3.14'
api 'com.airbnb.android:lottie:3.1.0'
/* api 'androidx.appcompat:appcompat:1.2.0-alpha02'
api 'com.android.support:design:28.0.0'
api 'com.android.support:support-v4:28.0.0'
api 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
api 'com.github.bumptech.glide:glide:4.9.0'
api 'jp.wasabeef:glide-transformations:4.0.1'
api 'com.android.support:multidex:1.0.0'
api 'com.squareup.okhttp3:okhttp:3.10.0'
api 'com.squareup.okhttp3:logging-interceptor:3.4.1'
api 'com.squareup.retrofit2:adapter-rxjava2:2.2.0'
api 'com.trello.rxlifecycle2:rxlifecycle:2.2.0'
api 'com.trello.rxlifecycle2:rxlifecycle-components:2.2.0'
api 'com.squareup.retrofit2:retrofit:2.3.0'
api 'com.squareup.retrofit2:converter-gson:2.3.0'
api 'com.squareup.okhttp3:logging-interceptor:3.4.1'
api 'org.jetbrains.anko:anko-common:0.9'
api 'com.badoo.mobile:android-weak-handler:1.1'
//AndroidX
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
//sdk相关
implementation 'com.android.support:support-v4:28.+'
implementation 'com.android.support:appcompat-v7:28.0.0'
// implementation 'com.google.code.gson:gson:2.8.5'
// implementation files('libs/poi-3.0-rc4-20070503.jar')
api('cn.vlion.inland:inlandmix:9.8.8') {
exclude group: 'cn.vlion.inland', module: 'inlandb'
exclude group: 'cn.vlion.inland', module: 'inlandg'
exclude group: 'cn.vlion.inland', module: 'inlands'
exclude group: 'cn.vlion.inland', module: 'inlandt'
exclude group: 'cn.vlion.inland', module: 'inlandtf'
exclude group: 'pl.droidsonroids.gif'
exclude group: 'cn.vlion.inland', module: 'inlandk'
exclude group: 'cn.vlion.inland', module: 'inlandimb'
exclude group: 'com.squareup.picasso'
exclude group: 'cn.vlion.inland', module: 'inlanddk'
exclude group: 'com.github.bumptech.glide'
exclude group: 'com.tuia'
exclude group: 'cn.vlion.inland', module: 'inlandhy'
// exclude group: 'com.mintegral.msdk'
exclude group: 'cn.vlion.inlandsh'
}
api "com.bx:adsdk:1.3.3"*/
}
......
......@@ -986,7 +986,18 @@ abstract class JavaInterface {
"showGetCoinsDialog type:" + type + " id:" + id + " coins:" + coins
)
mWebView.context.runOnUiThread {
CenterDialog.showHomeDialogStyle1(
if(act==null){
return@runOnUiThread
}
if (act?.isFinishing!!)return@runOnUiThread
CenterDialog.showH5Dialog(act!!,coins.toDouble(),1,2,object :H5Listener{
override fun onDialogClose(type: String, shutdownType: Int) {
mWebView.loadUrl("javascript:closeWindows('$type','$shutdownType')")
}
})
/*CenterDialog.showHomeDialogStyle1(
act, 3, View.OnClickListener {
if (type == 2 && it.id.equals(R.id.id_iv_dismiss)) {
......@@ -1027,9 +1038,9 @@ abstract class JavaInterface {
}
})
ReportPresenter.report()
/* if (com.ym.library.Constant.videoNumber < com.ym.library.Constant.videoCount - 1) {
*//* if (com.ym.library.Constant.videoNumber < com.ym.library.Constant.videoCount - 1) {
ToastUtils.showTextToast("再观看${(com.ym.library.Constant.videoCount - com.ym.library.Constant.videoNumber - 1)}个视频即可完成今日打卡")
}*/
}*//*
VideoNumberUtils.setVideoNumber()
VideoTimeUtils.setVideoTime()
......@@ -1057,46 +1068,6 @@ abstract class JavaInterface {
}
})
AdManager.playRewardAd(
ADConfig.AD_VIDEO,
action,
act!!,
object : ZXADVideoListener {
//看激励视频金币翻倍
override fun onAdClose() {//视频关闭
}
override fun onAdShow() {
AdManager.loadNextCacheRewardVideoAd(
ADConfig.AD_VIDEO,
act!!
)
}
override fun onAdVideoBarClick() {}
override fun onError(errorMsg: String?) {//视频播放错误
// AppClient.appApi.h5Receive(id)
// .compose(RxSchedulers.observableIO2Main())
// .subscribe(object : BaseObserver<BubbleOrBoxReceiveEntity?>() {
// override fun onSuccess(result: BubbleOrBoxReceiveEntity?) {}
// override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {} })
//
// CenterDialog.showH5Dialog(act!!, (coins.toDouble()*2), 0,type,object:H5Listener{
// override fun onDialogClose(type: String) {
// var type = "2"
// mWebView.loadUrl("javascript:closeWindows('$type')")
//
// }
//
// })
// LogUtils.e("huang2","h5page:"+type+" type:"+0)
}
override fun onSuccess() {}
})
}
}
......@@ -1106,7 +1077,7 @@ abstract class JavaInterface {
} else {
"H5_Not_Dimiss"
}, "0"
)
)*/
}
}
......@@ -1130,9 +1101,9 @@ abstract class JavaInterface {
mWebView.context.runOnUiThread {
if (VideoTimeUtils.isCanShowReward()) {
if (type == 1) {
Toast.makeText(act, "看完福利视频即可继续刮卡", Toast.LENGTH_SHORT).show()
//Toast.makeText(act, "看完福利视频即可继续刮卡", Toast.LENGTH_SHORT).show()
} else if (type == 2) {
Toast.makeText(act, "观看完激励视频即可继续获取心愿值", Toast.LENGTH_SHORT).show()
//Toast.makeText(act, "观看完激励视频即可继续获取心愿值", Toast.LENGTH_SHORT).show()
} else if (type == 3) {
//TODO 每日分红
}
......@@ -1140,13 +1111,14 @@ abstract class JavaInterface {
if (type == 1) {
action = "scraping_card_nomal_video"
} else if (type == 2) {
action = "rich_man_nomal_video"
// action = "rich_man_nomal_video"
action = type2
} else if (type == 3) {
action = "everyday_dividend_video"
}
AdManager.playRewardAd(ADConfig.AD_VIDEO, action, act!!, object :
ZXADVideoListener {
override fun onAdClose() {//视频关闭
if (act!=null){
AdUtils.playRewardAd(act!!,action,object :IAdVideoListener{
override fun onAdClose() {
if (type == 1) {
EventUtils.onEvent("close_scraping_card_nomal_video", "刮刮卡激励视频完成")
} else if (type == 2) {
......@@ -1162,21 +1134,15 @@ abstract class JavaInterface {
}
}
override fun onAdShow() {
AdManager.loadNextCacheRewardVideoAd(ADConfig.AD_VIDEO, act!!)
}
override fun onAdVideoBarClick() {}
override fun onError(errorMsg: String?) {//视频播放错误
override fun onError(errorMsg: String?) {
mWebView.context.runOnUiThread {
mWebView?.loadUrl("javascript:videoFail()")
}
}
override fun onSuccess() {}
})
}
}
}
}
......
......@@ -31,7 +31,7 @@ class XiaoManActivityMy : MyBaseActivity() {
* @param callback CampaignCallback 回调
*/
campaignFragment = CampaignFragment.newInstance(com.ym.modulecommon.utils.AdPreference.getToken())
campaignFragment?.setPlaceId("2773")
campaignFragment?.setPlaceId("2912")
campaignFragment?.setCallback(object : CampaignCallback() {
override fun showAd(params: String) {
super.showAd(params)
......
......@@ -20,10 +20,28 @@ public class NewLandListEntity {
private int configNum;
private float timeRate;
private int videoRate;
private int stopConfigNum;
private int currentWormNum;
private String xiaoManPath;
private List<LandListEntity> landList;
public int getCurrentWormNum() {
return currentWormNum;
}
public void setCurrentWormNum(int currentWormNum) {
this.currentWormNum = currentWormNum;
}
public int getStopConfigNum() {
return stopConfigNum;
}
public void setStopConfigNum(int stopConfigNum) {
this.stopConfigNum = stopConfigNum;
}
public String getXiaoManPath() {
return xiaoManPath;
}
......
......@@ -11,7 +11,7 @@ public class XiaoManEntity {
/**
* code : 0
* desc : 成功
* data : {"requestUrl":null,"materialPath":"https://static.hixiaoman.com/saas/img/place/2773.gif?t=3416a75f4cea9109507cacd8e2f2aefc","showUrl":"https://saas.hixiaoman.com/test/log","clickUrl":"https://saas.hixiaoman.com/test/log","placeMaterialId":61,"materialId":61}
* data : {"requestUrl":null,"materialPath":"https://static.hixiaoman.com/saas/img/place/2912.gif?t=3416a75f4cea9109507cacd8e2f2aefc","showUrl":"https://saas.hixiaoman.com/test/log","clickUrl":"https://saas.hixiaoman.com/test/log","placeMaterialId":61,"materialId":61}
*/
private String code;
......@@ -45,7 +45,7 @@ public class XiaoManEntity {
public static class DataBean {
/**
* requestUrl : null
* materialPath : https://static.hixiaoman.com/saas/img/place/2773.gif?t=3416a75f4cea9109507cacd8e2f2aefc
* materialPath : https://static.hixiaoman.com/saas/img/place/2912.gif?t=3416a75f4cea9109507cacd8e2f2aefc
* showUrl : https://saas.hixiaoman.com/test/log
* clickUrl : https://saas.hixiaoman.com/test/log
* placeMaterialId : 61
......
......@@ -166,7 +166,7 @@ public class NetConfig {
public static String WEB_URL_PURSEURL; //十万金币跳转
public static String CONFIRMURL = "http://h5v2test.zhangxinzhixun.com/monopoly/Confirm";//梦想成真
public static int mDFWType = 1;//大富翁type
}
public static class Novel {
......@@ -224,11 +224,11 @@ public class NetConfig {
public static final String URL_GAME_BUY_SEED = "app/v1/game/farm/buy_seed";//金币购买种子
public static final String URL_GAME_CLOUD_SPEED = "app/v1/game/farm/cloud_speed";//云朵加速
public static final String URL_GAME_HOME_INFO = "app/v1/game/farm/home_info";//首页信息
// public static final String URL_GAME_LIST_LAND = "app/v1/game/farm/list_land";//地块列表
// public static final String URL_GAME_LIST_LAND = "app/v1/game/farm/list_land";//地块列表
public static final String URL_GAME_OPEN_BOX = "app/v1/game/farm/open_box";//开宝箱
public static final String URL_GAME_ORDER_DATA = "app/v1/game/farm/order_data";//订单数据
public static final String URL_GAME_ORDER_RECEIVE = "app/v1/game/farm/order_receive";//订单领取
// public static final String URL_GAME_UNLOCK_LAND = "app/v1/game/farm/unlock_land";//解锁地块/种植种子/收获果实
// public static final String URL_GAME_UNLOCK_LAND = "app/v1/game/farm/unlock_land";//解锁地块/种植种子/收获果实
public static final String URL_GAME_USE_ACCELERATORS = "app/v1/game/farm/use_accelerators";//加速剂加速
public static final String URL_GAME_WAREHOUSE_DATA = "app/v1/game/farm/warehouseData";//仓库列表
public static final String URL_GAME_TURNTABLE_LIST = "app/v1/game/farm/turntable_list";//转盘列表
......@@ -249,9 +249,9 @@ public class NetConfig {
public static final String URL_GAME_ACCELERATORS_TASK_RECEIVE = "app/v1/game/ddcy/accelerators_task_receiveV2";//加速剂任务领取
public static final String URL_GAME_USER_GUIDE = "app/v1/game/ddcy/user_guide";
public static final String URL_GAME_RED_PACK_LIST="app/v1/game/farm/rp_list";//红包列表
public static final String URL_GAME_RED_PACK_RECEIVE="app/v1/game/farm/rp/receive";//拆红包 参数传红包id
public static final String URL_GAME_RED_PACK_AWARD_RECEIVE="app/v3/common/award/multiple";//翻倍领取接口
public static final String URL_GAME_RED_PACK_LIST = "app/v1/game/farm/rp_list";//红包列表
public static final String URL_GAME_RED_PACK_RECEIVE = "app/v1/game/farm/rp/receive";//拆红包 参数传红包id
public static final String URL_GAME_RED_PACK_AWARD_RECEIVE = "app/v3/common/award/multiple";//翻倍领取接口
public static final String URL_GAME_CLOUD_CHECK = "app/v1/game/farm/cloud_check";//云朵加速判断
......
......@@ -6,7 +6,7 @@ object ADConfig{
val AD_SPLASH = "splash"//开屏
val AD_LOAD_SPLASH = "task_load_splash"//开屏
val AD_VIDEO = "luck_card_video"
val AD_VIDEO = "common_video"
val AD_COINS_VIDEO = "sleep_coins_video"
val AD_CARD_BIGIMAGE = "scratch_card_bigimage"//模板
val AD_ACTIVITY_POPUP = "home_activity_popup"//插屏
......
......@@ -57,6 +57,12 @@ object AdUtils {
}
override fun onAdShow() {
if (actionName.equals("jiacishu")){
EventUtils.onEvent("dfw_touzi_video_show", "大富翁骰子视频曝光");
}
if (actionName.equals("kengwei")){
EventUtils.onEvent("dfw_qipan_video_show", "大富翁棋盘视频曝光");
}
Utils.showToast(activity, "看完视频可获得奖励")
// AdManager.loadNextCacheRewardVideoAd(ADConfig.AD_VIDEO, activity!!)
handler?.sendEmptyMessageDelayed(0, 2000)
......
......@@ -11,6 +11,7 @@ import com.ym.library.module.NewsEntity;
import com.ym.library.module.ShaveListEntity;
import com.ym.library.module.UserInfoEntity;
import com.ym.library.net.NetConfig;
import com.ym.library.router.RounterApi;
import com.ym.library.router.RounterBus;
import com.ym.library.rxbus.BusData;
......@@ -37,12 +38,12 @@ public class JumpUtils {
}
}
public static void h5Jump(String title, String url,boolean showToolbar,Activity activity) {
public static void h5Jump(String title, String url, boolean showToolbar, Activity activity) {
try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentActivityWeb(title, url,showToolbar);
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentActivityWeb(title, url, showToolbar);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
if (activity!=null){
if (activity != null) {
activity.startActivity(intent);
}
} catch (Exception e) {
......@@ -50,12 +51,12 @@ public class JumpUtils {
}
}
public static void h5NormalJump(String title, String url,boolean showToolbar,Activity activity) {
public static void h5NormalJump(String title, String url, boolean showToolbar, Activity activity) {
try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentActivityWeb(title, url,showToolbar);
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentActivityWeb(title, url, showToolbar);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
if (activity!=null){
if (activity != null) {
activity.startActivity(intent);
}
} catch (Exception e) {
......@@ -122,7 +123,7 @@ public class JumpUtils {
}
public static boolean isLogin(Boolean isJump) {
String token =com.ym.modulecommon.utils.AdPreference.getToken();
String token = com.ym.modulecommon.utils.AdPreference.getToken();
Log.i("TAG", "isLogin: " + token);
String uid = com.ym.modulecommon.utils.AdPreference.getUid();
UserInfoEntity entity = SettingPreference.getUserInfoData();
......@@ -270,7 +271,7 @@ public class JumpUtils {
try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentScratchCard();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra("json",entity);
intent.putExtra("json", entity);
AppliContext.get().startActivity(intent);
} catch (Exception e) {
}
......@@ -349,7 +350,7 @@ public class JumpUtils {
}
//广告跳转
public static void adJump(NewsEntity data,Activity activity) {
public static void adJump(NewsEntity data, Activity activity) {
Log.d("JumpUtils", "data.title =" + data.getTitle());
Log.d("JumpUtils", "data.openType =" + data.getOpentype());
Log.d("JumpUtils", "data.sid =" + data.getSid());
......@@ -373,6 +374,14 @@ public class JumpUtils {
//绑定微信号跳转
} else if (TextUtils.equals("2080", sid + "")) {
//签到提现任务
} else if (TextUtils.equals("2497", sid + "")) {
//掷骰子
JumpUtils.h5NormalJump(
"大富翁",
NetConfig.H5.CONFIRMURL + "?is_popup1=" + NetConfig.H5.mDFWType,
false,
activity
);
} else if (incentiveLevel > 0) {
if (sid.equals("2325")) {
//成就殿堂
......@@ -396,7 +405,7 @@ public class JumpUtils {
data.getDeep_url_re()
);
} else {
h5Jump(data.getTitle(), data.getUrl(),false,activity);
h5Jump(data.getTitle(), data.getUrl(), false, activity);
}
} else if (data.getOpentype() == NewsEntity.AD_TYPE_APPMODEL && data.getStatus() != 2) {
if (appmodelId == 59) {
......@@ -435,18 +444,20 @@ public class JumpUtils {
if (TextUtils.equals(sid, "2077")) {
//看视频加金币
}
showAd(activity,data);
showAd(activity, data);
}
}
public static void showAd(Activity activity,NewsEntity data) {
public static void showAd(Activity activity, NewsEntity data) {
AdUtils.INSTANCE.playRewardAd(activity, "box_click", new IAdVideoListener() {
@Override
public void onAdClose() { }
public void onAdClose() {
}
@Override
public void onError(@Nullable String errorMsg) { }
public void onError(@Nullable String errorMsg) {
}
});
}
......
......@@ -10,7 +10,7 @@ object VideoNumberUtils {
fun setVideoNumber(){
MyConstant.videoNumber = MyConstant.videoNumber+1
if (MyConstant.videoNumber < MyConstant.videoCount) {
ToastUtils.showTextToast("再观看${(MyConstant.videoCount - MyConstant.videoNumber)}个视频即可完成今日打卡")
//ToastUtils.showTextToast("再观看${(MyConstant.videoCount - MyConstant.videoNumber)}个视频即可完成今日打卡")
}
}
......
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