|
|
@@ -0,0 +1,62 @@
|
|
|
+package com.sheep.gamegroup.module.task.fragments;
|
|
|
+
|
|
|
+import com.sheep.gamegroup.util.LogUtil;
|
|
|
+import com.stmsdk.module.ad.StyleAdEntity;
|
|
|
+import com.tencent.tmsecure.dksdk.ad.DkAdManage;
|
|
|
+import com.tencent.tmsecure.dksdk.util.DkAppDownloadListener;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 游可盈广告视频
|
|
|
+ */
|
|
|
+public class FgtVideoTaskYKY extends FgtVideoTaskBase {
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void initView() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void initData() {
|
|
|
+ if (releaseTask.getH5_accepted_task_id() > 0) {
|
|
|
+ loadAcceptedTask();
|
|
|
+ } else {
|
|
|
+ LogUtil.logI("---------------没有接受任务---------------");
|
|
|
+ acceptTask();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void loadAd() {
|
|
|
+ preAd();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void preAd(){
|
|
|
+ /*String posid =
|
|
|
+ val type = if (TextUtils.isEmpty(posid)) "30031" else posid
|
|
|
+ val duration = if (TextUtils.isEmpty(mDuration.text)) "0" else mDuration.text.toString()
|
|
|
+ var data = "{\"placements\":[{\"pos_id\":$type,\"ad_count\":1}],\"ad_reward_trigger\":\"[]\", \"ad_reward_duration\":$duration, \"ad_reward_automute\": ${isAutoMute()} }"
|
|
|
+ data = data.replace("[]", if (TextUtils.isEmpty(mTrigger.text)) "5" else mTrigger.text.toString())
|
|
|
+ KleinManager.getInstance()?.loadEncourageAD(applicationContext, data, object: KleinResponseCallback {
|
|
|
+ override fun onFail(errorCode: Int) {
|
|
|
+ Log.e(TAG, "onFail : $errorCode")
|
|
|
+ }
|
|
|
+
|
|
|
+ override fun onSuccess(errorCode: Int) {
|
|
|
+ Log.d(TAG, "onSuccess : $errorCode")
|
|
|
+ }
|
|
|
+
|
|
|
+ override fun onEvent(code: Int) {
|
|
|
+ Log.d(TAG, "onEvent : $code")
|
|
|
+ }
|
|
|
+ })*/
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int getLayoutId() {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|