Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_youyou
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_youyou
Commits
8d654376
Commit
8d654376
authored
Mar 30, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加优量汇信息流
parent
ca56df1e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
YlhPreLoadExpressManager.kt
.../com/wenshu/youyou/ad/express/YlhPreLoadExpressManager.kt
+0
-5
CpdManager.kt
app/src/main/java/com/wenshu/youyou/manager/CpdManager.kt
+2
-2
TaskCpdFragment.kt
...ain/java/com/wenshu/youyou/ui/fragment/TaskCpdFragment.kt
+11
-8
No files found.
app/src/main/java/com/wenshu/youyou/ad/express/YlhPreLoadExpressManager.kt
View file @
8d654376
...
@@ -45,10 +45,6 @@ object YlhPreLoadExpressManager {
...
@@ -45,10 +45,6 @@ object YlhPreLoadExpressManager {
// 如果您在平台上新建平台模板2.0广告位时,选择了支持视频,那么可以进行个性化设置(可选)
// 如果您在平台上新建平台模板2.0广告位时,选择了支持视频,那么可以进行个性化设置(可选)
val
builder
=
VideoOption2
.
Builder
()
val
builder
=
VideoOption2
.
Builder
()
/**
* 如果广告位支持视频广告,强烈建议在调用loadData请求广告前设置setAutoPlayPolicy,有助于提高视频广告的eCPM值 <br/>
* 如果广告位仅支持图文广告,则无需调用
*/
/**
/**
* 如果广告位支持视频广告,强烈建议在调用loadData请求广告前设置setAutoPlayPolicy,有助于提高视频广告的eCPM值 <br></br>
* 如果广告位支持视频广告,强烈建议在调用loadData请求广告前设置setAutoPlayPolicy,有助于提高视频广告的eCPM值 <br></br>
* 如果广告位仅支持图文广告,则无需调用
* 如果广告位仅支持图文广告,则无需调用
...
@@ -68,7 +64,6 @@ object YlhPreLoadExpressManager {
...
@@ -68,7 +64,6 @@ object YlhPreLoadExpressManager {
mNativeExpressADData2
?.
destroy
()
mNativeExpressADData2
?.
destroy
()
if
(
adDataList
.
size
>
0
)
{
if
(
adDataList
.
size
>
0
)
{
mNativeExpressADData2
=
adDataList
[
0
]
mNativeExpressADData2
=
adDataList
[
0
]
mNativeExpressADData2
?.
getECPMLevel
()
+
" Video duration: "
+
mNativeExpressADData2
?.
getVideoDuration
()
mNativeExpressADData2
?.
setAdEventListener
(
object
:
AdEventListener
{
mNativeExpressADData2
?.
setAdEventListener
(
object
:
AdEventListener
{
override
fun
onClick
()
{
override
fun
onClick
()
{
}
}
...
...
app/src/main/java/com/wenshu/youyou/manager/CpdManager.kt
View file @
8d654376
...
@@ -18,8 +18,8 @@ import org.json.JSONObject
...
@@ -18,8 +18,8 @@ import org.json.JSONObject
object
CpdManager
{
object
CpdManager
{
/*单个任务id*/
/*单个任务id*/
const
val
BUSINESS_ID
=
""
const
val
BUSINESS_ID
=
"
m8919
"
const
val
KEY
=
""
const
val
KEY
=
"
TUlFv8gY2wNSF6eGnzKNXMo6xADUa8dD
"
/*列表任务id*/
/*列表任务id*/
const
val
BUSINESS_ID_LIST
=
""
const
val
BUSINESS_ID_LIST
=
""
...
...
app/src/main/java/com/wenshu/youyou/ui/fragment/TaskCpdFragment.kt
View file @
8d654376
...
@@ -74,7 +74,8 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -74,7 +74,8 @@ class TaskCpdFragment : BaseFragment(), TaskView,
private
val
outNetIp
by
lazy
{
SPUtil
.
getInstance
().
getString
(
Constant
.
OUT_NET_IP
)
}
private
val
outNetIp
by
lazy
{
SPUtil
.
getInstance
().
getString
(
Constant
.
OUT_NET_IP
)
}
private
var
mCoin
=
0
private
var
shCoin
=
0
private
var
sydCoin
=
0
private
var
needUseTime
=
-
1
// 应用试玩时间
private
var
needUseTime
=
-
1
// 应用试玩时间
private
var
shMax
=
0
//珊瑚 广告最大填充数
private
var
shMax
=
0
//珊瑚 广告最大填充数
...
@@ -140,7 +141,8 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -140,7 +141,8 @@ class TaskCpdFragment : BaseFragment(), TaskView,
override
fun
getShCpdTimeSuc
(
time
:
Int
,
coin
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
,
CPD_ORDER
:
String
?)
{
override
fun
getShCpdTimeSuc
(
time
:
Int
,
coin
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
,
CPD_ORDER
:
String
?)
{
needUseTime
=
time
needUseTime
=
time
mCoin
=
coin
shCoin
=
coin
sydCoin
=
coin
shMax
=
CPD
shMax
=
CPD
cpdMax
=
CPD_SYD
cpdMax
=
CPD_SYD
...
@@ -239,7 +241,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -239,7 +241,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
continue
continue
}
}
val
tzTaskBean
=
TzTaskBean
(
material
.
icons
,
material
.
description
,
material
.
title
,
false
,
m
Coin
,
0
,
material
.
app_apk_name
)
val
tzTaskBean
=
TzTaskBean
(
material
.
icons
,
material
.
description
,
material
.
title
,
false
,
syd
Coin
,
0
,
material
.
app_apk_name
)
tzTaskBean
.
app_url
=
material
.
app_url
tzTaskBean
.
app_url
=
material
.
app_url
tzTaskBean
.
trackerBean
=
material
.
tracker
tzTaskBean
.
trackerBean
=
material
.
tracker
mFakeTaskList
.
add
(
tzTaskBean
)
mFakeTaskList
.
add
(
tzTaskBean
)
...
@@ -288,7 +290,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -288,7 +290,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
continue
continue
}
}
val
tzTaskBean
=
TzTaskBean
(
material
.
icons
,
material
.
app_name
,
material
.
description
,
false
,
m
Coin
,
0
,
material
.
app_apk_name
)
val
tzTaskBean
=
TzTaskBean
(
material
.
icons
,
material
.
app_name
,
material
.
description
,
false
,
syd
Coin
,
0
,
material
.
app_apk_name
)
tzTaskBean
.
app_url
=
material
.
app_url
tzTaskBean
.
app_url
=
material
.
app_url
tzTaskBean
.
trackerListBean
=
material
.
tracker
tzTaskBean
.
trackerListBean
=
material
.
tracker
mFakeTaskList
.
add
(
tzTaskBean
)
mFakeTaskList
.
add
(
tzTaskBean
)
...
@@ -440,7 +442,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -440,7 +442,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
LogUtil
.
d
(
TAG
,
"shanhu onLoadSuccess times"
)
LogUtil
.
d
(
TAG
,
"shanhu onLoadSuccess times"
)
dataList
?.
let
{
dataList
?.
let
{
for
(
coralAD
in
it
)
{
for
(
coralAD
in
it
)
{
val
tzTaskBean
=
TzTaskBean
(
coralAD
.
icon
,
coralAD
.
title
,
coralAD
.
description
,
true
,
m
Coin
,
0
,
null
)
val
tzTaskBean
=
TzTaskBean
(
coralAD
.
icon
,
coralAD
.
title
,
coralAD
.
description
,
true
,
sh
Coin
,
0
,
null
)
tzTaskBean
.
coralAd
=
coralAD
tzTaskBean
.
coralAd
=
coralAD
mFakeTaskList
.
add
(
tzTaskBean
)
mFakeTaskList
.
add
(
tzTaskBean
)
}
}
...
@@ -538,11 +540,12 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -538,11 +540,12 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
}
2
->
{
2
->
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
mCoin
)
mTaskAdapter
?.
let
{
mTaskAdapter
?.
let
{
if
(
mFakeTaskList
[
it
.
getPosition
()].
isShCpd
)
{
if
(
mFakeTaskList
[
it
.
getPosition
()].
isShCpd
)
{
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
shCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_CPD
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_CPD
)
}
else
{
}
else
{
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
sydCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_CPD_SYD
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_CPD_SYD
)
}
}
}
}
...
@@ -582,7 +585,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -582,7 +585,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
if
(
mFakeTaskList
[
position
].
isShCpd
)
{
if
(
mFakeTaskList
[
position
].
isShCpd
)
{
taskDialog
=
TaskDialog
(
requireActivity
())
taskDialog
=
TaskDialog
(
requireActivity
())
taskDialog
?.
show
()
taskDialog
?.
show
()
taskDialog
?.
setData
(
mFakeTaskList
[
position
].
coralAd
,
needUseTime
,
m
Coin
)
taskDialog
?.
setData
(
mFakeTaskList
[
position
].
coralAd
,
needUseTime
,
sh
Coin
)
}
else
{
}
else
{
taskCpdDialog
=
TaskCpdDialog
(
requireActivity
(),
object
:
DialogListener
()
{
taskCpdDialog
=
TaskCpdDialog
(
requireActivity
(),
object
:
DialogListener
()
{
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
...
@@ -598,7 +601,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -598,7 +601,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
DownloadApkManager
.
downloadApk
(
requireActivity
(),
mFakeTaskList
[
position
].
app_url
,
mFakeTaskList
[
position
].
downLoadPkgName
)
DownloadApkManager
.
downloadApk
(
requireActivity
(),
mFakeTaskList
[
position
].
app_url
,
mFakeTaskList
[
position
].
downLoadPkgName
)
}
}
})
})
taskCpdDialog
?.
setData
(
mFakeTaskList
[
position
].
title
,
mFakeTaskList
[
position
].
description
,
mFakeTaskList
[
position
].
icon
,
needUseTime
,
m
Coin
)
taskCpdDialog
?.
setData
(
mFakeTaskList
[
position
].
title
,
mFakeTaskList
[
position
].
description
,
mFakeTaskList
[
position
].
icon
,
needUseTime
,
syd
Coin
)
taskCpdDialog
?.
show
()
taskCpdDialog
?.
show
()
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment