Commit 6e2cd387 authored by mengcuiguang's avatar mengcuiguang

变现猫优化

parent ea18cb22
......@@ -432,8 +432,6 @@
# ===================== 变现猫 START ================
-keep class com.bytedance.sdk.openadsdk.** { *; }
-keep public interface com.bytedance.sdk.openadsdk.downloadnew.** {*;}
-keep class com.ss.android.* {*;}
-keep class com.pgl.* {*;}
......
......@@ -7,31 +7,26 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission
android:name="android.permission.PACKAGE_USAGE_STATS"
tools:ignore="ProtectedPermissions" />
<permission
android:name="com.mints.goodmoney.permission.JPUSH_MESSAGE"
android:name="${applicationId}.permission.JPUSH_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="com.mints.goodmoney.permission.JPUSH_MESSAGE" />
<uses-permission android:name="${applicationId}.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<application
android:name=".MintsApplication"
......@@ -160,7 +155,7 @@
<action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <!-- Required 用户打开自定义通知栏的intent -->
<action android:name="cn.jpush.android.intent.ACTION_RICHPUSH_CALLBACK" /> <!-- Optional 用户接受Rich Push Javascript 回调函数的intent -->
<action android:name="cn.jpush.android.intent.CONNECTION" /> <!-- 接收网络变化 连接/断开 since 1.6.3 -->
<category android:name="com.mints.goodmoney" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<!--since 3.3.0 接收JPush相关事件-->
......@@ -203,7 +198,7 @@
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.mints.goodmoney.fileprovider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities">
......@@ -230,6 +225,7 @@
android:resource="@xml/ywsdk_file_paths" />
</provider>
<!-- 穿山甲广告 -->
<provider
android:name="com.bytedance.sdk.openadsdk.TTFileProvider"
......
......@@ -11,6 +11,7 @@ import androidx.multidex.MultiDexApplication;
import com.bun.miitmdid.core.JLibrary;
import com.component.dly.xzzq_ywsdk.YwSDK;
import com.mints.goodmoney.manager.BxmManager;
import com.mints.goodmoney.manager.LiebaoManager;
import com.mints.goodmoney.manager.OaidManager;
import com.mints.goodmoney.manager.TtCsjAdManager;
......@@ -104,7 +105,7 @@ public class MintsApplication extends MultiDexApplication {
}
// 优量汇
// initYlh();
initYlh();
// 穿山甲
initCsj();
......@@ -113,13 +114,16 @@ public class MintsApplication extends MultiDexApplication {
initYL();
// 鱼丸盒子
// initYwhz();
initYwhz();
// 猎豹游戏初始化
// LiebaoManager.getInstance().initCmGameSdk();
LiebaoManager.getInstance().initCmGameSdk();
// 掌阅书城
ZhangyueManager.INSTANCE.onCreateIreader(this);
// 变现猫
BxmManager.INSTANCE.initBxm(this);
}
/**
......@@ -150,6 +154,7 @@ public class MintsApplication extends MultiDexApplication {
* 穿山甲
*/
private void initCsj() {
// LogUtil.d("csjcsj",TtCsjAdManager.getVersion());
TtCsjAdManager.init(this);
}
......
......@@ -140,6 +140,7 @@ object Constant {
const val HOT_ACTIVITY_WATER = "water"
const val HOT_ACTIVITY_WALK = "walk"
const val HOT_ACTIVITY_CARD = "card"
const val HOT_ACTIVITY_BXM = "bianxianmao"
const val HOT_ACTIVITY_H5 = "h5"
// 打开激活
......
......@@ -15,11 +15,11 @@ import com.mints.goodmoney.common.Constant
*/
object BxmManager {
const val APP_ID = ""
const val APP_ID = "3b08a06c36a04eb7ad31ee31547b9e69"
const val BUTTON_AD_SPOT_ID = ""
const val BUTTON_AD_SPOT_ID = "807020001003"
var bdAdvanceButtonAd: BDAdvanceButtonAd? = null
private var bdAdvanceButtonAd: BDAdvanceButtonAd? = null
/**
* 初始化
......
......@@ -59,6 +59,10 @@ public class TtCsjAdManager {
}
}
public static String getVersion(){
return TTAdSdk.getAdManager().getSDKVersion();
}
private static TTAdConfig buildConfig(Context context) {
boolean logFlag;
if (BuildConfig.DEBUG) {
......
......@@ -100,7 +100,6 @@ class MyPresenter : BasePresenter<MyView>() {
when (code) {
200 -> {
view.getUserTaskMsgSuc(baseResponse.data)
myHotActivity()
}
401 -> view.getUserTaskMsgFail()
else -> {
......@@ -125,7 +124,7 @@ class MyPresenter : BasePresenter<MyView>() {
/**
* 热门活动接口
*/
private fun myHotActivity() {
fun myHotActivity() {
val vo = HashMap<String, Any>()
vo["os"] = "android"
vo["isShowYwhzGame"] = true
......
......@@ -42,6 +42,7 @@ class PanPresenter : BasePresenter<PanView>() {
200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo()
view.loginSuc()
}
else -> view.showToast(message)
}
......@@ -85,7 +86,7 @@ class PanPresenter : BasePresenter<PanView>() {
if (isLinkView) return
val code = baseResponse.status
when (code) {
// 200 -> baseMsg()
}
}
})
......
package com.mints.goodmoney.mvp.views
interface PanView : BaseView {
fun loginSuc()
}
\ No newline at end of file
......@@ -157,7 +157,7 @@ class LoginActivity : BaseActivity()
override fun loginSuc() {
try {
// 登录成功初始化鱼玩盒子userid
// baseApplication.initYwSdk()
baseApplication.initYwSdk()
} catch (e: Exception) {
}
......
package com.mints.goodmoney.ui.adapter;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import com.mints.goodmoney.R;
import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.manager.BxmManager;
import com.mints.goodmoney.mvp.model.BannerBean;
import com.mints.goodmoney.utils.ForegroundOrBackground;
import com.mints.library.utils.GlideUtils;
import java.util.List;
......@@ -25,10 +32,12 @@ public class GvMyAdapter extends BaseAdapter {
private List<BannerBean.ListBean> orders;
private Context context;
private Activity activity;
public GvMyAdapter(Context context, List<BannerBean.ListBean> orders) {
public GvMyAdapter(Context context, Activity activity, List<BannerBean.ListBean> orders) {
this.orders = orders;
this.context = context;
this.activity = activity;
}
@Override
......@@ -46,6 +55,7 @@ public class GvMyAdapter extends BaseAdapter {
return position;
}
@SuppressLint("WrongViewCast")
@Override
public View getView(int position, View convertView, ViewGroup parent) {
......@@ -56,6 +66,7 @@ public class GvMyAdapter extends BaseAdapter {
convertView = inflater.inflate(R.layout.item_list_my, null);
viewHolder = new ViewHolder();
viewHolder.fl_my_icon = (FrameLayout) convertView.findViewById(R.id.fl_my_icon);
viewHolder.ic_my_icon = (ImageView) convertView.findViewById(R.id.ic_my_icon);
viewHolder.tv_my_title = (TextView) convertView.findViewById(R.id.tv_my_title);
......@@ -65,14 +76,19 @@ public class GvMyAdapter extends BaseAdapter {
}
BannerBean.ListBean data = orders.get(position);
if (data != null) {
GlideUtils.loadImageViewLoding(context, data.getImgUrl(), viewHolder.ic_my_icon, R.mipmap.ic_my_gury, R.mipmap.ic_my_gury);
GlideUtils.loadImageViewGifUrl(context, viewHolder.ic_my_icon, data.getImgUrl());
viewHolder.tv_my_title.setText(data.getTitle());
if (TextUtils.equals(data.getToUrl(), Constant.HOT_ACTIVITY_BXM)) {
BxmManager.INSTANCE.loadButtonAd(activity, viewHolder.fl_my_icon);
}
}
return convertView;
}
class ViewHolder {
public ImageView ic_my_icon;
public FrameLayout fl_my_icon;
public TextView tv_my_title;
}
}
......
......@@ -8,6 +8,7 @@ import android.content.Context
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import android.view.ViewGroup
import android.widget.AdapterView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.DividerItemDecoration
......@@ -16,20 +17,22 @@ import cn.sharesdk.framework.Platform.ShareParams
import cn.sharesdk.framework.ShareSDK
import cn.sharesdk.wechat.friends.Wechat
import com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import com.ireader.ireadersdk.IreaderApi
import com.mints.goodmoney.BuildConfig
import com.mints.goodmoney.R
import com.mints.goodmoney.ad.VedioAdingManager
import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.BxmManager
import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.mvp.model.*
import com.mints.goodmoney.mvp.presenters.MyPresenter
import com.mints.goodmoney.mvp.views.MyView
import com.mints.goodmoney.ui.activitys.*
import com.mints.goodmoney.ui.adapter.GvMyAdapter
import com.mints.goodmoney.ui.adapter.MainMyAdapter
import com.mints.goodmoney.ui.adapter.listener.OnItemChildClickListener
import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.utils.ForegroundOrBackground
import com.mints.goodmoney.utils.ImageUtil
import com.mints.goodmoney.utils.SpanUtils
import com.mints.library.net.netstatus.NetUtils
......@@ -74,6 +77,9 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
private val dataList: MutableList<TaskBean> = mutableListOf()
private var mainMyAdapter: MainMyAdapter? = null
// 轮播图只展示一次
private var bannerFlag = false
override fun getContentViewLayoutID() = R.layout.fragment_main_my
override fun initViewsAndEvents() {
......@@ -157,6 +163,11 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
myPresenter.getSignInHomePageMsg()
if (!bannerFlag) {
bannerFlag = true
myPresenter.myHotActivity()
}
userConfig = data
handleRecyData()
setUserLoginStatus()
......@@ -171,13 +182,13 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
override fun getMyHotActivitySuc(data: BannerBean?) {
item_promotions_egv.visibility = View.GONE
// item_promotions_egv.visibility = View.GONE
// data?.let {
// item_promotions_egv.visibility = View.VISIBLE
// hotList = it.list
// item_promotions_egv.adapter = GvMyAdapter(mContext, hotList)
// }
data?.let {
item_promotions_egv.visibility = View.VISIBLE
hotList = it.list
item_promotions_egv.adapter = GvMyAdapter(mContext, activity!!, hotList)
}
}
override fun getSignInHomePageMsgSuc(signBean: SignCardBean?) {
......@@ -496,7 +507,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
try {
activity?.let { open(it) }
}catch (e:Exception){
} catch (e: Exception) {
e.printStackTrace()
showToast("请重新退出账号登录")
}
......@@ -560,7 +571,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
}
override fun onItemClick(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
override fun onItemClick(parent: AdapterView<*>, view: View, position: Int, id: Long) {
if (hotList!!.isNotEmpty()) {
val hotBean: BannerBean.ListBean = hotList!![position]
val hotTourl: String = hotBean.toUrl
......@@ -576,6 +587,8 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
Constant.HOT_ACTIVITY_CARD -> {
readyGo(EraseActivity::class.java)
}
Constant.HOT_ACTIVITY_BXM -> {
}
else -> {
val bundle = Bundle()
bundle.putString(WebActivity.WEB_TITLE, hotBean.title)
......
......@@ -52,19 +52,24 @@ class PanFragment : BaseFragment(), PanView {
if (TextUtils.isEmpty(userManager?.userID)) {
// 游客登录
panPresenter.userLogin()
}
} else {
if (!isLoadPanSuc && NetUtils.isNetworkConnected(getContext())) {
loadTurnUrl()
}
}
}
}
override fun onDestroy() {
super.onDestroy()
panPresenter.detachView()
}
override fun loginSuc() {
if (!isLoadPanSuc && NetUtils.isNetworkConnected(getContext())) {
loadTurnUrl()
}
}
/**
* 加载转盘url
......@@ -121,4 +126,6 @@ class PanFragment : BaseFragment(), PanView {
// 调用js中的方法(必须和js中的handlerName想同)
blTurntableWebview.callHandler("cancelTurnTable", "") {}
}
}
\ No newline at end of file
......@@ -5,13 +5,18 @@
android:orientation="vertical"
android:paddingTop="10dp">
<FrameLayout
android:id="@+id/fl_my_icon"
android:layout_width="38dp"
android:layout_gravity="center_horizontal"
android:layout_height="38dp">
<ImageView
android:id="@+id/ic_my_icon"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_gravity="center_horizontal"
android:scaleType="fitXY"
android:src="@mipmap/ic_my_gury" />
android:scaleType="fitXY" />
</FrameLayout>
<TextView
android:id="@+id/tv_my_title"
......
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