Commit 648284b0 authored by jyx's avatar jyx

Merge branch 'dev_ad' of http://39.97.65.143:81/android/android_goodmoney into dev_ad

parents fd015458 99b7a69c
......@@ -94,7 +94,6 @@ class RTAVideoAdManager private constructor(activity: Activity) : BaseVideoAd()
TrackManager.getInstance().reportClickAdEvent()
}
LogUtil.d(TAG, "onADClick")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_RTA, Constant.EVENT_TYPE_TWO, "", "")
if (isClickScreen) {
// 防止重复
......
......@@ -7,6 +7,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.text.TextUtils;
import com.mints.goodmoney.MintsApplication;
import com.mints.goodmoney.ad.video.base.VideoAdStatusListener;
import com.mints.goodmoney.common.AppConfig;
import com.mints.goodmoney.common.Constant;
......@@ -16,6 +17,7 @@ import com.mints.goodmoney.mvp.model.WeightBean;
import com.mints.goodmoney.service.AppInstallService;
import com.mints.goodmoney.utils.AppUtil;
import com.mints.goodmoney.utils.LogUtil;
import com.mints.goodmoney.utils.ToastUtil;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
......@@ -204,7 +206,7 @@ public class VideoAdingManager {
/**
* 根据广告优先级获取下一个
* 穿山甲->优量汇->穿山甲全屏->快手->珊瑚->闪电盒子->枫岚(兜底)
* 穿山甲->优量汇->穿山甲全屏->快手->珊瑚->闪电盒子->RTA->枫岚(兜底)
*/
private String getNextAdType() {
String nextAdType;
......@@ -218,8 +220,6 @@ public class VideoAdingManager {
nextAdType = Constant.KS_VEDIO_AD;
} else if (AppConfig.shVideoAdCount > 0) {
nextAdType = Constant.SH_VEDIO_AD;
} else if (AppConfig.rtaVideoAdCount > 0) {
nextAdType = Constant.RTA_VEDIO_AD;
} else {
nextAdType = Constant.FL_VEDIO_AD;
}
......
......@@ -18,6 +18,9 @@ object MokuManager {
private const val APP_SECRET = "421ec06a6f1dbd75010f6f9e4d821cfe03e3a7a3"
/**
* 若gotoMoku前 校验了权限方法,可不用init
*/
fun init(activity: Activity) {
try {
//初始化sdk
......
......@@ -273,12 +273,8 @@ public class VersionUpdatePresenter {
mUpdateService.setUpdateNotification(new UpdateService.UpdateNotification() {
@Override
public void updateProgress(int progress) {
if (pbDuUpdating != null) {
pbDuUpdating.setProgress(progress);
if (btnDuUpdate != null && progress == 100) {
btnDuUpdate.setEnabled(true);
}
}
}
......
......@@ -59,6 +59,7 @@ public class UpdateService extends Service {
if (updateFile != null) {
createNotification();// 首次创建
createThread();// 线程下载
}
} else {
stopService();
......@@ -172,7 +173,7 @@ public class UpdateService extends Service {
contentView.setTextViewText(R.id.notificationPercent,
msg.arg1 + "%");
contentView.setProgressBar(R.id.notificationProgress, 100,
contentView.setProgressBar(R.id.notificationProgress, 50,
msg.arg1, false);
notificationManager.notify(notification_id, notification);
......@@ -278,6 +279,10 @@ public class UpdateService extends Service {
message.what = DOWN_PROGRESS;
message.arg1 = updateCount;
handler.sendMessage(message);
System.out.println("mcg __> downloadCount:"+downloadCount);
System.out.println("mcg __> updateCount:"+updateCount);
System.out.println("mcg __> down_step:"+(totalSize));
}
}
if (httpURLConnection != null) {
......
......@@ -52,7 +52,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override fun initViewsAndEvents() {
ZhangyueManager.onCreateIreader(baseApplication)
MokuManager.init(this)
// MokuManager.init(this)
showShortVedioLayout()
......
......@@ -48,6 +48,7 @@ import com.mints.library.net.netstatus.NetUtils
import com.mints.library.utils.CommonUtils
import com.mints.library.utils.GlideUtils
import com.mints.library.utils.nodoubleclick.AntiShake
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
......@@ -260,21 +261,22 @@ class MyFragment : BaseFragment(),
mCurrentIndex = 0
piv_grid.count = pageCount
piv_grid.setAnimationType(AnimationType.THIN_WORM)
vp_grid.adapter = ViewPagerAdapter(pagerList)
vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) {
}
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
}
override fun onPageSelected(position: Int) {
mCurrentIndex = position
piv_grid.selection = position
}
})
// vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
// override fun onPageScrollStateChanged(state: Int) {
// }
//
// override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
// }
//
// override fun onPageSelected(position: Int) {
// mCurrentIndex = position
//
// piv_grid.selection = position
// }
//
// })
}
override fun getSignInHomePageMsgSuc(signBean: SignCardBean?) {
......@@ -1172,6 +1174,21 @@ class MyFragment : BaseFragment(),
item_customer_service.setOnClickListener(this)
// item_promotions_egv.onItemClickListener = this
vp_grid.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) {
}
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
}
override fun onPageSelected(position: Int) {
mCurrentIndex = position
piv_grid.selection = position
}
})
}
/**
......@@ -1435,7 +1452,8 @@ class MyFragment : BaseFragment(),
private fun gotoMoku() {
RxPermissions(requireActivity())
.request(Manifest.permission.READ_PHONE_STATE,
Manifest.permission.READ_EXTERNAL_STORAGE)
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE)
.subscribe { granted: Boolean ->
if (granted) {
MokuManager.gotoMoku(requireContext())
......
......@@ -13,9 +13,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:visibility="gone"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:visibility="gone"
app:piv_count="2"
app:piv_selectedColor="@color/color_FF9837"
app:piv_unselectedColor="@color/color_20000000"
......
......@@ -20,5 +20,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:max="60"
android:indeterminateOnly="false"
android:progressDrawable="@drawable/progress_bar_horizontal" />
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