Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold_pro
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_highgold_pro
Commits
291bf543
Commit
291bf543
authored
May 17, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
快手及OneWay激励视频对接
parent
80818114
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
322 additions
and
133 deletions
+322
-133
build.gradle
app/build.gradle
+3
-1
Oneway-2.4.9-release.jar
app/libs/Oneway-2.4.9-release.jar
+0
-0
kssdk-ad-3.3.6-publishRelease.aar
app/libs/kssdk-ad-3.3.6-publishRelease.aar
+0
-0
kssdk-all--3.3.16-publishRelease-9ffe2b94e.aar
app/libs/kssdk-all--3.3.16-publishRelease-9ffe2b94e.aar
+0
-0
oneway-common-core-1.0.10.aar
app/libs/oneway-common-core-1.0.10.aar
+0
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+19
-20
MintsApplication.java
app/src/main/java/com/mints/goldspace/MintsApplication.java
+4
-0
KsPreLoadExpressManager.kt
...com/mints/goldspace/ad/express/KsPreLoadExpressManager.kt
+6
-1
KsVideoAdManager.kt
...ain/java/com/mints/goldspace/ad/video/KsVideoAdManager.kt
+2
-0
OwVideoAdManager.kt
...ain/java/com/mints/goldspace/ad/video/OwVideoAdManager.kt
+100
-0
Constant.kt
app/src/main/java/com/mints/goldspace/common/Constant.kt
+1
-0
KsManager.kt
app/src/main/java/com/mints/goldspace/manager/KsManager.kt
+3
-3
OwManager.kt
app/src/main/java/com/mints/goldspace/manager/OwManager.kt
+23
-0
AboutusActivity.kt
.../java/com/mints/goldspace/ui/activitys/AboutusActivity.kt
+42
-0
MainFragment.kt
...main/java/com/mints/goldspace/ui/fragment/MainFragment.kt
+94
-106
ow_file_paths.xml
app/src/main/res/xml/ow_file_paths.xml
+23
-0
local.properties
local.properties
+2
-2
No files found.
app/build.gradle
View file @
291bf543
...
...
@@ -273,7 +273,9 @@ dependencies {
implementation
(
name:
'tzsdk_core-3.0.0-20200807131516-release'
,
ext:
'aar'
)
implementation
(
name:
'tzsdk_reporter-3.0.0-20200807131516-release'
,
ext:
'aar'
)
// 快手
implementation
(
name:
'kssdk-ad-3.3.6-publishRelease'
,
ext:
'aar'
)
implementation
(
name:
'kssdk-all--3.3.16-publishRelease-9ffe2b94e'
,
ext:
'aar'
)
// OneWay
implementation
(
name:
'oneway-common-core-1.0.10'
,
ext:
'aar'
)
// testImplementation 'junit:junit:4.13'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
...
...
app/libs/Oneway-2.4.9-release.jar
0 → 100644
View file @
291bf543
File added
app/libs/kssdk-ad-3.3.6-publishRelease.aar
deleted
100644 → 0
View file @
80818114
File deleted
app/libs/kssdk-all--3.3.16-publishRelease-9ffe2b94e.aar
0 → 100644
View file @
291bf543
File added
app/libs/oneway-common-core-1.0.10.aar
0 → 100644
View file @
291bf543
File added
app/src/main/AndroidManifest.xml
View file @
291bf543
...
...
@@ -36,6 +36,7 @@
<uses-permission
android:name=
"android.permission.ANSWER_PHONE_CALLS"
/>
<uses-permission
android:name=
"android.permission.SYSTEM_ALERT_WINDOW"
/>
<uses-permission
android:name=
"com.mints.goldspace.permission"
/>
<permission
android:name=
"com.mints.goldspace.permission"
android:protectionLevel=
"normal"
/>
...
...
@@ -203,10 +204,17 @@
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".call.permission.PermissionActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".call.detail.DetailApplyActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<!-- OneWay激励视频 -->
<activity
android:name=
"mobi.oneway.export.AdShowActivity"
android:configChanges=
"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated=
"true"
android:theme=
"@android:style/Theme.NoTitleBar.Fullscreen"
/>
<service
android:name=
".service.UpdateService"
...
...
@@ -258,29 +266,11 @@
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:theme=
"@android:style/Theme.Translucent.NoTitleBar"
android:windowSoftInputMode=
"stateHidden|adjustResize"
/>
<activity
android:name=
"cn.sharesdk.tencent.qq.ReceiveActivity"
android:launchMode=
"singleTask"
android:noHistory=
"true"
>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<category
android:name=
"android.intent.category.BROWSABLE"
/>
<data
android:scheme=
"tencent1109991028"
/>
</intent-filter>
</activity>
<activity
android:name=
".wxapi.WXEntryActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:exported=
"true"
android:theme=
"@android:style/Theme.Translucent.NoTitleBar"
/>
<activity
android:name=
".apshare.ShareEntryActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:exported=
"true"
android:theme=
"@android:style/Theme.Translucent.NoTitleBar"
/>
<provider
android:name=
"androidx.core.content.FileProvider"
...
...
@@ -357,6 +347,15 @@
android:resource=
"@xml/wn_file_paths"
/>
</provider>
<provider
android:name=
"mobi.oneway.export.OWProvider"
android:authorities=
"${applicationId}.OWProvider"
android:exported=
"false"
android:grantUriPermissions=
"true"
>
<meta-data
android:name=
"android.support.FILE_PROVIDER_PATHS"
android:resource=
"@xml/ow_file_paths"
/>
</provider>
<!-- 来电秀 -->
<service
...
...
app/src/main/java/com/mints/goldspace/MintsApplication.java
View file @
291bf543
...
...
@@ -16,6 +16,7 @@ import com.mints.goldspace.manager.KsManager;
import
com.mints.goldspace.manager.LiebaoManager
;
import
com.mints.goldspace.manager.MhManager
;
import
com.mints.goldspace.manager.MiitHelper
;
import
com.mints.goldspace.manager.OwManager
;
import
com.mints.goldspace.manager.RsNewsManager
;
import
com.mints.goldspace.manager.TtCsjAdManager
;
import
com.mints.goldspace.manager.TzManager
;
...
...
@@ -128,6 +129,9 @@ public class MintsApplication extends MultiDexApplication {
// 枫岚广告
MhManager
.
INSTANCE
.
initWn
(
this
);
// OneWay广告
OwManager
.
INSTANCE
.
init
(
this
);
// 天卓珊瑚
TzManager
.
INSTANCE
.
initTz
(
this
);
...
...
app/src/main/java/com/mints/goldspace/ad/express/KsPreLoadExpressManager.kt
View file @
291bf543
package
com.mints.goldspace.ad.express
import
android.annotation.SuppressLint
import
android.content.DialogInterface
import
android.text.TextUtils
import
android.util.Log
import
android.view.LayoutInflater
...
...
@@ -96,7 +97,7 @@ object KsPreLoadExpressManager {
}
override
fun
onVideoPlayError
(
what
:
Int
,
extra
:
Int
)
{
LogUtil
.
d
(
"KsPreLoadExpressManager"
,
"id=${what} extra=${extra}"
)
LogUtil
.
d
(
"KsPreLoadExpressManager"
,
"id=${what} extra=${extra}"
)
}
})
...
...
@@ -192,6 +193,10 @@ object KsPreLoadExpressManager {
// Toast.makeText(mContext, "广告" + ad.appName + "展示", Toast.LENGTH_SHORT).show()
}
}
override
fun
handleDownloadDialog
(
p0
:
DialogInterface
.
OnClickListener
?):
Boolean
{
return
false
}
})
// 广告描述
...
...
app/src/main/java/com/mints/goldspace/ad/video/KsVideoAdManager.kt
View file @
291bf543
...
...
@@ -111,6 +111,8 @@ class KsVideoAdManager private constructor() :
}
}
override
fun
onRequestResult
(
p0
:
Int
)
{}
})
...
...
app/src/main/java/com/mints/goldspace/ad/video/OwVideoAdManager.kt
0 → 100644
View file @
291bf543
package
com.mints.goldspace.ad.video
import
android.app.Activity
import
com.mints.goldspace.ad.video.base.BaseVideoAd
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
import
com.mints.goldspace.common.AppConfig
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.manager.OwManager
import
com.mints.goldspace.manager.TrackManager
import
mobi.oneway.export.Ad.OWRewardedAd
import
mobi.oneway.export.AdListener.OWRewardedAdListener
import
mobi.oneway.export.enums.OnewayAdCloseType
import
mobi.oneway.export.enums.OnewaySdkError
private
val
TAG
=
OwVideoAdManager
::
class
.
java
.
simpleName
/**
* OneWay广告视频
*/
class
OwVideoAdManager
private
constructor
()
:
BaseVideoAd
()
{
private
var
videoAdStatusListener
:
VideoAdStatusListener
?
=
null
private
var
owRewardedAd
:
OWRewardedAd
?
=
null
private
var
isClickScreen
:
Boolean
=
true
companion
object
{
private
var
_inst
:
OwVideoAdManager
?
=
null
fun
getInstance
():
OwVideoAdManager
?
{
return
if
(
_inst
!=
null
)
{
_inst
}
else
{
_inst
=
OwVideoAdManager
()
_inst
}
}
}
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
isClickScreen
=
true
//创建激励视频事件监听器
val
owRewardedAdListener
:
OWRewardedAdListener
=
object
:
OWRewardedAdListener
{
override
fun
onAdReady
()
{
owRewardedAd
?.
show
(
activity
)
}
override
fun
onAdShow
(
tag
:
String
)
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_OW
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
)
}
override
fun
onAdClick
(
tag
:
String
)
{
if
(
AppConfig
.
needReportClickAdEvent
)
{
TrackManager
.
getInstance
().
reportClickAdEvent
()
}
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_OW
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
)
if
(
isClickScreen
)
{
// 防止重复
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_OW
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
}
videoAdStatusListener
?.
adDownload
()
}
override
fun
onAdClose
(
tag
:
String
,
onewayVideoCloseType
:
OnewayAdCloseType
)
{
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_OW
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_OW
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
videoAdStatusListener
?.
adSuccess
()
}
override
fun
onAdFinish
(
s
:
String
,
onewayAdCloseType
:
OnewayAdCloseType
,
s1
:
String
)
{
}
override
fun
onSdkError
(
onewaySdkError
:
OnewaySdkError
,
s
:
String
)
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_OW
,
Constant
.
EVENT_TYPE_ONE
,
s
,
""
)
videoAdStatusListener
?.
adFail
()
}
}
//创建激励视频对象
owRewardedAd
=
OWRewardedAd
(
activity
,
OwManager
.
REWARD_PID
,
owRewardedAdListener
)
owRewardedAd
?.
loadAd
()
}
fun
setVideoAdStatusListener
(
videoAdStatusListener
:
VideoAdStatusListener
?)
{
this
.
videoAdStatusListener
=
videoAdStatusListener
}
override
fun
onDestroy
()
{
owRewardedAd
?.
destory
()
owRewardedAd
=
null
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/common/Constant.kt
View file @
291bf543
...
...
@@ -150,6 +150,7 @@ object Constant {
const
val
AD_SOURCE_CSJFULL
=
"CSJFULL"
const
val
AD_SOURCE_SH
=
"CORAL"
//珊瑚天卓
const
val
AD_SOURCE_KS
=
"KS"
//快手
const
val
AD_SOURCE_OW
=
"OW"
//OneWay
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
const
val
EVENT_TYPE_ZERO
=
"0"
...
...
app/src/main/java/com/mints/goldspace/manager/KsManager.kt
View file @
291bf543
...
...
@@ -12,13 +12,13 @@ import com.mints.goldspace.R
*/
object
KsManager
{
private
const
val
KS_APP_ID
=
"5
51900003
"
private
const
val
KS_APP_ID
=
"5
74600004
"
/*信息流*/
const
val
KS_AD_NATIVEEXPRESS_AWARD
=
5
519000010
const
val
KS_AD_NATIVEEXPRESS_AWARD
=
5
746000025
/* vedio-postid */
const
val
KS_AD_VEDIO_POSTID
=
5
519000009
const
val
KS_AD_VEDIO_POSTID
=
5
746000024
/**
* 初始化
...
...
app/src/main/java/com/mints/goldspace/manager/OwManager.kt
0 → 100644
View file @
291bf543
package
com.mints.goldspace.manager
import
android.app.Application
import
com.maplehaze.adsdk.MaplehazeSDK
import
mobi.oneway.export.Ad.OnewaySdk
/**
* 描述:OneWay激励视频
* 作者:孟崔广
*/
object
OwManager
{
private
const
val
PUBLISH_ID
=
"dae8ca1f086a4e27"
const
val
REWARD_PID
=
"CZFL1VG8J6YQFR7I"
/**
* 初始化
*/
fun
init
(
application
:
Application
)
{
OnewaySdk
.
configure
(
application
,
PUBLISH_ID
)
}
}
\ No newline at end of file
app/src/main/java/com/mints/goldspace/ui/activitys/AboutusActivity.kt
View file @
291bf543
...
...
@@ -8,12 +8,19 @@ import com.mints.goldspace.MintsApplication
import
com.mints.goldspace.R
import
com.mints.goldspace.common.AppConfig
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.manager.OwManager
import
com.mints.goldspace.ui.activitys.base.BaseActivity
import
com.mints.goldspace.utils.LogUtil
import
com.mints.goldspace.utils.ToastUtil
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.ConstantUtil
import
kotlinx.android.synthetic.main.activity_aboutus.*
import
kotlinx.android.synthetic.main.header_layout.*
import
mobi.oneway.export.Ad.OWRewardedAd
import
mobi.oneway.export.AdListener.OWRewardedAdListener
import
mobi.oneway.export.enums.OnewayAdCloseType
import
mobi.oneway.export.enums.OnewaySdkError
/**
* 描述:关于我们
...
...
@@ -40,6 +47,41 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
true
}
//创建激励视频事件监听器
val
owRewardedAdListener
:
OWRewardedAdListener
=
object
:
OWRewardedAdListener
{
override
fun
onAdReady
()
{
LogUtil
.
d
(
" onAdReady"
)
}
override
fun
onAdShow
(
tag
:
String
)
{
LogUtil
.
d
(
" onAdShow"
)
}
override
fun
onAdClick
(
tag
:
String
)
{
LogUtil
.
d
(
" onAdClick"
)
}
override
fun
onAdClose
(
tag
:
String
,
onewayVideoCloseType
:
OnewayAdCloseType
)
{
LogUtil
.
d
(
" OnAdClose: $tag, type: $onewayVideoCloseType"
)
}
override
fun
onAdFinish
(
s
:
String
,
onewayAdCloseType
:
OnewayAdCloseType
,
s1
:
String
)
{
LogUtil
.
d
(
" onAdFinish: $s, type: $onewayAdCloseType"
)
}
override
fun
onSdkError
(
onewaySdkError
:
OnewaySdkError
,
s
:
String
)
{
LogUtil
.
d
(
"onSdkError$onewaySdkError:$s"
)
}
}
//创建激励视频对象
val
owRewardedAd
=
OWRewardedAd
(
this
,
OwManager
.
REWARD_PID
,
owRewardedAdListener
)
owRewardedAd
.
loadAd
()
tv_title
.
setOnClickListener
{
owRewardedAd
.
show
(
this
)
}
initListener
()
}
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/MainFragment.kt
View file @
291bf543
This diff is collapsed.
Click to expand it.
app/src/main/res/xml/ow_file_paths.xml
0 → 100644
View file @
291bf543
<?xml version="1.0" encoding="utf-8"?>
<resources>
<paths>
<root-path
name=
"root"
path=
""
/>
<files-path
name=
"files"
path=
""
/>
<external-path
name=
"sdcard"
path=
""
/>
<cache-path
name=
"cache"
path=
""
/>
<external-files-path
name=
"exFiles"
path=
""
/>
<external-cache-path
name=
"exCache"
path=
""
/>
</paths>
</resources>
\ No newline at end of file
local.properties
View file @
291bf543
...
...
@@ -4,5 +4,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#
Mon Mar 15 17:59
:26 CST 2021
sdk.dir
=
/Users/
mcg
/Library/Android/sdk
#
Wed May 12 10:08
:26 CST 2021
sdk.dir
=
/Users/
Hello
/Library/Android/sdk
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