| | |
| | | android:value="570f28a578d6e12cba6f7f200b8d1c83"></meta-data> |
| | | <meta-data |
| | | android:name="UMENG_CHANNEL" |
| | | android:value="vivo"></meta-data> |
| | | android:value="oppo"></meta-data> |
| | | |
| | | |
| | | <provider |
| | |
| | | "draw_banner_code_id": "947590714", |
| | | "drama_rewarded_ad_code_id": "952314219", |
| | | "drama_rewarded_ad_code_id_02": "952314221", |
| | | "drama_draw_ad_code_id": "952314220" |
| | | "drama_draw_ad_code_id": "952314220", |
| | | "staggered_grid_ad_code_id_02": "961663478" |
| | | }, |
| | | "novel": { |
| | | "status": 1, |
| | |
| | | "end_ad_code_id": "947236544" |
| | | }, |
| | | "live": null, |
| | | "license_config": null |
| | | "license_config": [ |
| | | { |
| | | "PackageName": "com.doudou.ysvideo", |
| | | "BundleId": "com.doudou.ysvideo", |
| | | "StartTime": "20250226T025005Z", |
| | | "ExpireTime": "20270226T025005Z", |
| | | "CreatedTime": "20250226T025005Z", |
| | | "Signature": "DGR9Bt+vLkk6lJJKdtWFyDw/hDRLIPv0OPwqJaOqLv3BqW2vK2v/NLdHgUpmLTnIB0ICoP+xyvR/omSmy3XWpkxy4rVUDmd/f5N58xWeTM7c6igcpkMJhdK/wpRGhVdlWLT8fJjCbFvUwtBT3Rfv6dL0VZ+Rbxkr+j0AsgKDOTbqMgHLMCE5vR9U2q6WV+tr/vfxSINLECSKy1EuiyT9uoisVnYK5PzvVtdTE2hehf+xDxkTK2SXADsmXsmpffYjwoTmt5tszEdPyjSx3VsaJJjawgrRLdHp4PjCCTiKAXTX3wdCKNMZZ2weIJv1t3A1syh/+XWony1tgZ3EM4j45Q==", |
| | | "Content": "eyJJZCI6IjQ1NjM4MTQ0MiIsICJWZXJzaW9uIjoyLCAiQ2hhbm5lbCI6ImFkX2NzaiIsICJUeXBlIjoyLCAiUGFja2FnZU5hbWUiOiJjb20uZG91ZG91LnlzdmlkZW8iLCAiQnVuZGxlSWQiOiJjb20uZG91ZG91LnlzdmlkZW8iLCAiTW9kdWxlcyI6W3siTmFtZSI6InZvZF9wbGF5IiwgIkVkaXRpb24iOiJwcmVtaXVtX2VkaXRpb24iLCAiU3RhcnRUaW1lIjoxNzQwNTM4MjA1MjcwLCAiRXhwaXJlVGltZSI6MTgwMzYxMDIwNTI3MCwgIkV4cGlyZUJ1ZmZlciI6MTU1NTIwMDAwMDB9XSwgIkZpbGVWZXJzaW9uIjoiMTc0MDUzODIwNTI4MzAzMjk4MSJ9", |
| | | "MainURL": "https://vod-license-m.volccdn.com/vod-license/l-456381442-ch-ad_csj-a-300965.lic?lk3s=0d9f7a7d\u0026x-expires=4894138205\u0026x-signature=0yUX6Rv4bQg9wavpPZQoOX3THGA%3D", |
| | | "BackupURL": "https://vod-license-b.volccdn.com/vod-license/l-456381442-ch-ad_csj-a-300965.lic?lk3s=0d9f7a7d\u0026x-expires=4894138205\u0026x-signature=qWAEGejcRE7mn6%2Fxmdu4WKl%2BESQ%3D", |
| | | "Id": "456381442" |
| | | } |
| | | ] |
| | | } |
| | |
| | | apply plugin: 'android' |
| | | apply plugin: 'com.huawei.agconnect' |
| | | //apply from: 'https://sf3-fe-tos.pglstatp-toutiao.com/obj/pangle-empower/android/pangrowth_media/plugin_config.gradle' |
| | | |
| | | configurations.all { |
| | | exclude group: "com.bytedance.boringssl.so", module: 'boringssl-so' |
| | | //若接入流媒体sdk(小视频、直播)需要force constraint-layout版本 |
| | | resolutionStrategy { |
| | | force 'com.android.support.constraint:constraint-layout:1.1.2' |
| | |
| | | // } |
| | | // implementation('com.volcengine:apm_insight_crash:1.4.2') |
| | | // implementation('com.volcengine:apm_insight_sdk:1.0.3') |
| | | // 5.6.1.5 |
| | | // implementation 'com.pangle.cn:ads-sdk-pro:6.3.1.7' |
| | | implementation 'com.pangle.cn:mediation-sdk:6.3.1.7' |
| | | implementation("com.pangle.cn:pangrowth-dpsdk:5.1.1.0") { |
| | | implementation 'com.pangle.cn:mediation-sdk:6.6.0.7' |
| | | implementation ('com.pangle.cn:pangrowth-dpsdk:5.2.1.0'){ |
| | | exclude group: 'com.pangle.cn', module: 'adclog' |
| | | } |
| | | implementation 'com.pangle.cn:pangrowth-base:2.1.0.0' |
| | | implementation 'com.pangle.cn:pangrowth-djx-sdk:2.1.0.0' |
| | | implementation 'com.pangle.cn:pangrowth-nov-sdk:2.1.0.0' |
| | | implementation 'com.pangle.cn:pangrowth-base:2.7.0.0' |
| | | implementation 'com.pangle.cn:pangrowth-djx-sdk-lite:2.7.0.0' |
| | | implementation 'com.pangle.cn:pangrowth-nov-sdk:2.7.0.0' |
| | | implementation 'com.bytedance.applog:RangersAppLog-Lite-cn:6.15.3' |
| | | |
| | | |
| | |
| | | java { |
| | | exclude '**/XMPushMessageReceiver.java' |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | defaultConfig { |
| | | applicationId "com.doudou.ysvideo" |
| | | versionCode 149 |
| | | versionName "3.10.31" |
| | | versionCode 153 |
| | | versionName "3.11.2" |
| | | multiDexEnabled = true |
| | | minSdkVersion 21 |
| | | targetSdkVersion 30 |
| | |
| | | android:layout_marginBottom="80dp"> |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:layout_marginRight="58dp" |
| | | android:id="@+id/ll_login_qq" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | |
| | | android:id="@+id/ll_login_wx" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="58dp" |
| | | android:gravity="center_horizontal" |
| | | android:orientation="vertical"> |
| | | |
| | |
| | | } |
| | | @Override |
| | | public boolean isCanUseApplist() { //是否允许获取应用列表,默认允许 |
| | | return true; |
| | | return false; |
| | | } |
| | | @Override |
| | | public boolean isCanUseAndroidId() {//是否允许获取 AndroidId,默认允许 |
| | |
| | | SingleToast.showToast(LoginActivity.this, "选择同意用户协议后方可登录"); |
| | | break; |
| | | } |
| | | if (Build.VERSION.SDK_INT < 30) { |
| | | if (Build.VERSION.SDK_INT < 30&&false) { |
| | | //Android 11以下的要请求安装应用列表 |
| | | if (mPermissionsChecker.lacksPermissions(getPermissions())) {//检测是否有写入的权限 |
| | | mPermissionsChecker.showNormalDialog("设备应用列表权限说明", "判断设备是否安装QQ/微信,用于三方登录"); |
| | |
| | | SingleToast.showToast(LoginActivity.this, "选择同意用户协议后方可登录"); |
| | | break; |
| | | } |
| | | |
| | | if (Build.VERSION.SDK_INT < 30) { |
| | | // Toast.makeText(this, String.format("基带版本:%s SDK版本:%s", Build.BRAND, Build.VERSION.SDK_INT), Toast.LENGTH_LONG).show(); |
| | | if (Build.VERSION.SDK_INT < 30&&false) { |
| | | //Android 11以下的要请求安装应用列表 |
| | | if (mPermissionsChecker.lacksPermissions(getPermissions())) {//检测是否有写入的权限 |
| | | mPermissionsChecker.showNormalDialog("设备应用列表权限说明", "判断设备是否安装QQ/微信,用于三方登录"); |
| | |
| | | feedVideos.setName("热门"); |
| | | categories.add(1, feedVideos); |
| | | //抖音短剧 |
| | | if(!AndroidManifestUtil.isHuaWeiChannel(getContext())) { |
| | | feedVideos = new HomeClass(); |
| | | feedVideos.setDataType("dyDrama"); |
| | | feedVideos.setName("剧场"); |
| | | categories.add(1, feedVideos); |
| | | } |
| | | // if(!AndroidManifestUtil.isHuaWeiChannel(getContext())) { |
| | | feedVideos = new HomeClass(); |
| | | feedVideos.setDataType("dyDrama"); |
| | | feedVideos.setName("剧场"); |
| | | categories.add(1, feedVideos); |
| | | // } |
| | | } |
| | | } |
| | | |
| | |
| | | findViewById(R.id.ll_activity_login).setOnClickListener(this); |
| | | findViewById(R.id.fl_category).setOnClickListener(this); |
| | | |
| | | if (AndroidManifestUtil.isHuaWeiChannel(getApplicationContext())) { |
| | | mAQuery.id(R.id.rb_nav_short_tv).visibility(View.GONE); |
| | | } else { |
| | | mAQuery.id(R.id.rb_nav_short_tv).visibility(View.VISIBLE); |
| | | } |
| | | // if (AndroidManifestUtil.isHuaWeiChannel(getApplicationContext())) { |
| | | // mAQuery.id(R.id.rb_nav_short_tv).visibility(View.GONE); |
| | | // } else { |
| | | // mAQuery.id(R.id.rb_nav_short_tv).visibility(View.VISIBLE); |
| | | // } |
| | | |
| | | |
| | | initialer.run(); |
| | |
| | | } |
| | | }); |
| | | |
| | | if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) { |
| | | String[] permissions={ |
| | | Manifest.permission.READ_PHONE_STATE |
| | | }; |
| | | ActivityCompat.requestPermissions(MainActivity.this, permissions, 10010); |
| | | } |
| | | // if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) { |
| | | // String[] permissions={ |
| | | // Manifest.permission.READ_PHONE_STATE |
| | | // }; |
| | | // ActivityCompat.requestPermissions(MainActivity.this, permissions, 10010); |
| | | // } |
| | | } |
| | | |
| | | /** |
| | |
| | | return; |
| | | } |
| | | |
| | | if(AndroidManifestUtil.isVIVOChannel(getApplicationContext())){ |
| | | if(!AdUtil.canShowAd(getApplicationContext(), AndroidManifestUtil.getChannel(this), AdPositionEnum.homeInterstitial)){ |
| | | // VIVO首页插屏一天显示一次 |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | adCallback = new Runnable() { |
| | | @Override |
| | |
| | | else { |
| | | InterstitialAdUtil.showAd(MainActivity.this, type, GDTConstant.HOME_INTERSTITIAL); |
| | | } |
| | | |
| | | if(AndroidManifestUtil.isVIVOChannel(getApplicationContext())){ |
| | | AdUtil.setAdShown(getApplicationContext(), AndroidManifestUtil.getChannel(getApplicationContext()), AdPositionEnum.homeInterstitial); |
| | | } |
| | | } |
| | | }; |
| | | //延迟三秒显示 |
| | |
| | | if ("vivo".equalsIgnoreCase(AndroidManifestUtil.getChannel(getContext()))) { |
| | | return; |
| | | } |
| | | if( AndroidManifestUtil.isHuaWeiChannel(getContext())){ |
| | | return; |
| | | } |
| | | |
| | | |
| | | if (AdUtil.getAdType(getContext(), AdPositionEnum.splash) == null) { |
| | | return; |
| | | } |
| | | |
| | | AdUtil.AD_TYPE adType = AndroidManifestUtil.isHuaWeiChannel(getContext())?AdUtil.AD_TYPE.hw: AdUtil.AD_TYPE.gdt2; |
| | | AdUtil.AD_TYPE adType = AdUtil.AD_TYPE.gdt2; |
| | | if(AndroidManifestUtil.isOppoChannel(getContext())){ |
| | | adType = null; |
| | | } |
| | |
| | | import com.weikou.beibeivideo.BasicTextHttpResponseHandler; |
| | | import com.weikou.beibeivideo.BeibeiVideoAPI; |
| | | import com.weikou.beibeivideo.R; |
| | | import com.weikou.beibeivideo.entity.AdTag; |
| | | import com.weikou.beibeivideo.entity.AdType; |
| | | import com.weikou.beibeivideo.entity.HomeAd; |
| | | import com.weikou.beibeivideo.entity.HomeType; |
| | | import com.weikou.beibeivideo.entity.HomeTypeItem; |
| | |
| | | import com.weikou.beibeivideo.entity.JumpDetail; |
| | | import com.weikou.beibeivideo.entity.VideoInfo; |
| | | import com.weikou.beibeivideo.entity.VideoType; |
| | | import com.weikou.beibeivideo.entity.ad.AdPositionEnum; |
| | | import com.weikou.beibeivideo.entity.ad.ExpressAdContainer; |
| | | import com.weikou.beibeivideo.entity.recommend.HomeClass; |
| | | import com.weikou.beibeivideo.ui.category.bean.HotStar; |
| | |
| | | { |
| | | return; |
| | | } |
| | | |
| | | AdUtil.AD_TYPE adType = AdUtil.getAdType(getContext(), AdPositionEnum.homeInterstitial); |
| | | if(adType==null){ |
| | | return; |
| | | } |
| | | Log.i(TAG, "请求首页大广告"); |
| | | try { |
| | | |
| | | // ExpressAdManager recommendAdManager = new ExpressAdManager(AdUtil.AD_TYPE.hw, context); |
| | | ExpressAdManager recommendAdManager = new ExpressAdManager(AndroidManifestUtil.isHuaWeiChannel(getContext())?AdUtil.AD_TYPE.hw: AdUtil.AD_TYPE.csj, context); |
| | | ExpressAdManager recommendAdManager = new ExpressAdManager(adType, context); |
| | | recommendAdManager.loadRecommendLargeAd(new ExpressAdManager.IAdLoadListener() { |
| | | @Override |
| | | public void onSuccess(final List<ExpressAdContainer> adList) { |
| | |
| | | } else |
| | | newAdType = AdUtil.AD_TYPE.gdt2; |
| | | |
| | | if (AndroidManifestUtil.isHuaWeiChannel(getApplicationContext())) |
| | | newAdType = AdUtil.AD_TYPE.hw; |
| | | // if (AndroidManifestUtil.isHuaWeiChannel(getApplicationContext())) |
| | | // newAdType = AdUtil.AD_TYPE.hw; |
| | | |
| | | new ExpressAdManager(newAdType, getApplicationContext()).loadSearchAd(DimenUtils.px2dip(getApplicationContext(), width), new ExpressAdManager.IAdLoadListener() { |
| | | @Override |
| | |
| | | JSONObject object = new JSONObject(config); |
| | | object = object.optJSONObject(position.getPositionName()); |
| | | if (object != null) |
| | | if (AndroidManifestUtil.isHuaWeiChannel(context)&&false){ |
| | | if (AndroidManifestUtil.isHuaWeiChannel(context) && false) { |
| | | return AD_TYPE.hw; |
| | | }else { |
| | | } else { |
| | | return AD_TYPE.valueOf(object.optString("type")); |
| | | } |
| | | } catch (JSONException e) { |
| | |
| | | return null; |
| | | } |
| | | } else { |
| | | if (AndroidManifestUtil.isHuaWeiChannel(context)&&false) { |
| | | if (AndroidManifestUtil.isHuaWeiChannel(context) && false) { |
| | | return AD_TYPE.hw; |
| | | } else { |
| | | return AD_TYPE.gdt; |
| | |
| | | |
| | | // 是否可以显示华为的广告 |
| | | public static boolean canShowAdHuaWei(Context context, AdPositionEnum position) { |
| | | return canShowAd(context, "huawei", position); |
| | | } |
| | | |
| | | public static void setAdHuaWeiShown(Context context, AdPositionEnum position) { |
| | | setAdShown(context, "huawei", position); |
| | | } |
| | | |
| | | |
| | | // 是否可以显示华为的广告 |
| | | public static boolean canShowAd(Context context, String channel, AdPositionEnum position) { |
| | | SharedPreferences share = context.getSharedPreferences("adConfig", Context.MODE_PRIVATE); |
| | | Long lastTime = share.getLong("huawei_show_time_" + position.name(), 0); |
| | | long lastTime = share.getLong(channel + "_show_time_" + position.name(), 0); |
| | | if (TimeUtils.millisToStringDate(System.currentTimeMillis(), "yyyyMMdd").equalsIgnoreCase(TimeUtils.millisToStringDate(lastTime, "yyyyMMdd"))) { |
| | | //同一天 |
| | | return false; |
| | |
| | | return true; |
| | | } |
| | | |
| | | public static void setAdHuaWeiShown(Context context, AdPositionEnum position) { |
| | | public static void setAdShown(Context context, String channel, AdPositionEnum position) { |
| | | SharedPreferences share = context.getSharedPreferences("adConfig", Context.MODE_PRIVATE); |
| | | SharedPreferences.Editor editor = share.edit(); |
| | | editor.putLong("huawei_show_time_" + position.name(), System.currentTimeMillis()); |
| | | editor.putLong(channel + "_show_time_" + position.name(), System.currentTimeMillis()); |
| | | editor.commit(); |
| | | } |
| | | |
| | |
| | | package com.lcjian.library.util.common; |
| | | |
| | | import android.content.Context; |
| | | import android.os.Build; |
| | | |
| | | import com.lcjian.library.util.ManifestDataUtil; |
| | | |
| | | public class AndroidManifestUtil { |
| | | |
| | | public static String getChannel(Context context){ |
| | | return ManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL"); |
| | | public static String getChannel(Context context) { |
| | | String channel = ManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL"); |
| | | if ("huawei".equalsIgnoreCase(channel)) { |
| | | String deviceModel = Build.BRAND; |
| | | if ("honor".equalsIgnoreCase(deviceModel)) { |
| | | return "honor"; |
| | | } |
| | | } |
| | | return channel; |
| | | } |
| | | |
| | | public static boolean isHuaWeiChannel(Context context){ |
| | | public static boolean isHuaWeiChannel(Context context) { |
| | | return "huawei".equalsIgnoreCase(getChannel(context)); |
| | | } |
| | | |
| | | public static boolean isOppoChannel(Context context){ |
| | | public static boolean isOppoChannel(Context context) { |
| | | return "oppo".equalsIgnoreCase(getChannel(context)); |
| | | } |
| | | |
| | | public static boolean isVIVOChannel(Context context){ |
| | | public static boolean isVIVOChannel(Context context) { |
| | | return "vivo".equalsIgnoreCase(getChannel(context)); |
| | | } |
| | | |