Commit 3de20a57 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 3b5ddb43
......@@ -21,17 +21,6 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!-- 穿山甲 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!--必要权限,解决安全风险漏洞,发送和注册广播事件需要调用带有传递权限的接口-->
<permission
android:name="${applicationId}.openadsdk.permission.TT_PANGOLIN"
android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.openadsdk.permission.TT_PANGOLIN" />
<application
android:name=".MintsApplication"
android:allowBackup="true"
......@@ -202,82 +191,5 @@
android:resource="@xml/provider_paths" />
</provider>
<!-- Pangle start================== -->
<provider
android:name="com.bytedance.sdk.openadsdk.TTFileProvider"
android:authorities="${applicationId}.TTFileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/pangle_file_paths" />
</provider>
<provider
android:name="com.bytedance.sdk.openadsdk.multipro.TTMultiProvider"
android:authorities="${applicationId}.TTMultiProvider"
android:exported="false" />
<!-- Pangle end================== -->
<!-- GDT start================== -->
<!-- targetSDKVersion >= 24时才需要添加这个provider。provider的authorities属性的值为${applicationId}.fileprovider,请开发者根据自己的${applicationId}来设置这个值,例如本例中applicationId为"com.qq.e.union.demo"。 -->
<provider
android:name="com.qq.e.comm.GDTFileProvider"
android:authorities="${applicationId}.gdt.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/gdt_file_path" />
</provider>
<activity
android:name="com.qq.e.ads.PortraitADActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait" />
<activity
android:name="com.qq.e.ads.LandscapeADActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="landscape"
tools:replace="android:screenOrientation" />
<!-- 声明SDK所需要的组件 -->
<service
android:name="com.qq.e.comm.DownloadService"
android:exported="false" />
<!-- 请开发者注意字母的大小写,ADActivity,而不是AdActivity -->
<activity
android:name="com.qq.e.ads.ADActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
<!-- GDT end================== -->
<!-- baidu start================== -->
<!-- 声明打开落地页的Activity(不建议修改主题配置)-->
<activity
android:name="com.baidu.mobads.sdk.api.AppActivity"
android:configChanges="screenSize|keyboard|keyboardHidden|orientation"
android:theme="@android:style/Theme.NoTitleBar" />
<!-- 声明打开显示激励视频/全屏视频的Activity-->
<activity
android:name="com.baidu.mobads.sdk.api.MobRewardVideoActivity"
android:configChanges="screenSize|orientation|keyboardHidden"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
tools:replace="android:configChanges"/>
<!-- 如果targetSdkVersion设置值>=24,则强烈建议添加以下provider,否则会影响app变现 -->
<!-- android:authorities="${packageName}.bd.provider" authorities中${packageName}部分必须替换成app自己的包名 -->
<!-- 原来的FileProvider在新版本中改为BdFileProvider,继承自v4的FileProvider,需要在应用内引用support-v4包 -->
<provider
android:name="com.baidu.mobads.sdk.api.BdFileProvider"
android:authorities="${applicationId}.bd.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/bd_file_paths" />
</provider>
<!-- baidu end================== -->
</application>
</manifest>
\ No newline at end of file
......@@ -20,7 +20,7 @@ import com.duben.heliapp.utils.BubbleUtils;
@SuppressLint("DrawAllocation")
public class CycleProgress extends View {
private static final long DURATION = 400;
private static final long DURATION = 200;
private int mViewWidth;
private int mViewHeight;
......
package com.duben.heliapp.utils
import com.bytedance.sdk.openadsdk.mediation.manager.MediationBaseManager
class GromorePrintUtil {
companion object {
private val TAG = GromorePrintUtil::class.java.simpleName
/**
* 打印其他加载信息
*/
fun printLoadInfo(adInfo: MediationBaseManager?) {
LogUtil.d(TAG, "--------------------- printLoadInfo 11111111 ------------------------")
adInfo?.let {
val adLoadInfo = adInfo.adLoadInfo
LogUtil.d(TAG, "--------------------- 广告加载信息 start ------------------------")
LogUtil.d(TAG, "------ 广告加载信息 ")
adLoadInfo.forEach { it ->
LogUtil.d(
TAG,
"代码位id = ${it.mediationRit} adnName = ${it.adnName} adType = ${it.adType}" +
" errCode = ${it.errCode} errMsg = ${it.errMsg}"
)
}
LogUtil.d(TAG, "------ 广告价格信息 ")
val multiBiddingEcpm = adInfo.multiBiddingEcpm
multiBiddingEcpm?.let {
it.forEach { item ->
LogUtil.d(
TAG,
"sdkName = ${item.sdkName} slotId = ${item.slotId} levelTag = ${item.levelTag}" +
" ecpm = ${item.ecpm} reqBiddingType = ${item.reqBiddingType} errorMsg = ${item.errorMsg} requestId = ${item.requestId}"
)
}
}
LogUtil.d(TAG, "------ 最优广告价格信息 ")
val bestEcpm = adInfo.bestEcpm
bestEcpm?.let {
LogUtil.d(
TAG,
"sdkName = ${bestEcpm.sdkName} slotId = ${bestEcpm.slotId} levelTag = ${bestEcpm.levelTag}" +
" ecpm = ${bestEcpm.ecpm} reqBiddingType = ${bestEcpm.reqBiddingType} " +
"errorMsg = ${bestEcpm.errorMsg} requestId = ${bestEcpm.requestId}"
)
}
LogUtil.d(TAG, "------ 当前缓存池的全部信息 ")
val cacheList = adInfo.cacheList
cacheList?.let {
it.forEach { item ->
LogUtil.d(
TAG,
"sdkName = ${item.sdkName} slotId = ${item.slotId} levelTag = ${item.levelTag}" +
" ecpm = ${item.ecpm} reqBiddingType = ${item.reqBiddingType} errorMsg = ${item.errorMsg} requestId = ${item.requestId}"
)
}
}
LogUtil.d(TAG, "--------------------- 广告加载信息 end ------------------------")
}
LogUtil.d(TAG, "--------------------- printLoadInfo 22222222 ------------------------")
}
/**
* 打印展示
*/
fun printShowInfo(adInfo: MediationBaseManager?) {
adInfo?.let {
LogUtil.d(TAG, "--------------------- 广告展示信息 start ------------------------")
val showEcpm = adInfo.showEcpm
if(showEcpm != null){
LogUtil.d(
TAG,
"sdkName = ${showEcpm.sdkName} slotId = ${showEcpm.slotId} levelTag = ${showEcpm.levelTag}" +
" ecpm = ${showEcpm.ecpm} reqBiddingType = ${showEcpm.reqBiddingType} " +
"errorMsg = ${showEcpm.errorMsg} requestId = ${showEcpm.requestId}"
)
} else {
LogUtil.d(TAG, "showEcpm is null")
}
LogUtil.d(TAG, "--------------------- 广告加载信息 end ------------------------")
}
}
}
}
\ 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