Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
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_vedio
Commits
472989d0
Commit
472989d0
authored
Nov 13, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加引力sdk
parent
d63ef004
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
278 additions
and
193 deletions
+278
-193
build.gradle
video/app/build.gradle
+10
-8
MintsApplication.java
...c/main/java/com/duben/happyplayletu/MintsApplication.java
+3
-1
CsjAppLogManager.kt
.../java/com/duben/happyplayletu/manager/CsjAppLogManager.kt
+184
-184
GravityEngineManager.kt
...a/com/duben/happyplayletu/manager/GravityEngineManager.kt
+65
-0
build.gradle
video/build.gradle
+16
-0
No files found.
video/app/build.gradle
View file @
472989d0
...
@@ -10,8 +10,8 @@ android {
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.duben.happyplayletu"
applicationId
"com.duben.happyplayletu"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
72
1
versionCode
72
2
versionName
"7.2.
1
"
versionName
"7.2.
2
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
@@ -223,16 +223,18 @@ dependencies {
...
@@ -223,16 +223,18 @@ dependencies {
// 穿山甲聚合 接入【穿山甲、快手】
// 穿山甲聚合 接入【穿山甲、快手】
implementation
"com.pangle.cn:mediation-sdk:6.4.1.5"
implementation
"com.pangle.cn:mediation-sdk:6.4.1.5"
// 穿山甲Applog 上报组件(必须)
// // 穿山甲Applog 上报组件(必须)
implementation
'com.bytedance.applog:RangersAppLog-Lite-cn:6.16.3'
// implementation 'com.bytedance.applog:RangersAppLog-Lite-cn:6.16.3'
// 穿山甲商业化转化组件(必须)
// // 穿山甲商业化转化组件(必须)
implementation
'com.bytedance.ads:AppConvert:1.3.0.5'
// implementation 'com.bytedance.ads:AppConvert:1.3.0.5'
//埋点开发工具,DevTools是 Debug 环境下辅助开发者或测试人员进行应用内埋点验证和 SDK 接入问题排查的组件。请使用 debug 依赖,建议仅在 debug 下做调试
// debugImplementation 'com.bytedance.applog:RangersAppLog-DevTools:3.3.4'
// 腾讯播放器
// 腾讯播放器
implementation
"com.tencent.liteav:LiteAVSDK_Player:11.3.0.13176"
implementation
"com.tencent.liteav:LiteAVSDK_Player:11.3.0.13176"
// 引力引擎 SDK
implementation
"cn.gravity.android:GravityEngineSDK:4.8.11"
testImplementation
'junit:junit:4.13.2'
testImplementation
'junit:junit:4.13.2'
androidTestImplementation
'androidx.test.ext:junit:1.1.3'
androidTestImplementation
'androidx.test.ext:junit:1.1.3'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.4.0'
...
...
video/app/src/main/java/com/duben/happyplayletu/MintsApplication.java
View file @
472989d0
...
@@ -12,6 +12,7 @@ import com.downloader.PRDownloaderConfig;
...
@@ -12,6 +12,7 @@ import com.downloader.PRDownloaderConfig;
import
com.duben.happyplayletu.ad.TTAdManagerHolder
;
import
com.duben.happyplayletu.ad.TTAdManagerHolder
;
import
com.duben.happyplayletu.common.Constant
;
import
com.duben.happyplayletu.common.Constant
;
import
com.duben.happyplayletu.manager.CsjAppLogManager
;
import
com.duben.happyplayletu.manager.CsjAppLogManager
;
import
com.duben.happyplayletu.manager.GravityEngineManager
;
import
com.duben.happyplayletu.manager.TXCSDKService
;
import
com.duben.happyplayletu.manager.TXCSDKService
;
import
com.duben.happyplayletu.manager.TalkingDataManager
;
import
com.duben.happyplayletu.manager.TalkingDataManager
;
import
com.duben.happyplayletu.net.LoanService
;
import
com.duben.happyplayletu.net.LoanService
;
...
@@ -82,7 +83,8 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -82,7 +83,8 @@ public class MintsApplication extends MultiDexApplication {
TXCSDKService
.
init
(
this
);
TXCSDKService
.
init
(
this
);
CsjAppLogManager
.
INSTANCE
.
init
(
this
);
// CsjAppLogManager.INSTANCE.init(this);
GravityEngineManager
.
INSTANCE
.
initGravityEngine
(
this
);
TalkingDataManager
.
INSTANCE
.
init
(
this
);
TalkingDataManager
.
INSTANCE
.
init
(
this
);
...
...
video/app/src/main/java/com/duben/happyplayletu/manager/CsjAppLogManager.kt
View file @
472989d0
This diff is collapsed.
Click to expand it.
video/app/src/main/java/com/duben/happyplayletu/manager/GravityEngineManager.kt
0 → 100644
View file @
472989d0
package
com.duben.happyplayletu.manager
import
android.app.Application
import
cn.gravity.android.GEConfig
import
cn.gravity.android.GravityEngineSDK
import
cn.gravity.android.InitializeCallback
import
com.duben.happyplayletu.MintsApplication
import
com.duben.happyplayletu.utils.DeviceUuidFactory
import
com.duben.happyplayletu.utils.LogUtil
import
com.duben.happyplayletu.utils.MateUtils.getAppMetaData
import
com.duben.library.utils.json.JsonUtil
import
org.json.JSONObject
/**
* 描述:引力引擎SDK
* 作者:孟崔广
*/
object
GravityEngineManager
{
private
const
val
ACCESS_TOKEN
=
"T9ycxLEd4outVfGnr2cmpFhpuizklKqA"
private
const
val
ENABLE_SYNC_ATTRIBUTION
=
false
/**
* 初始化
*
* ACCESS_TOKEN : 项目通行证,同启动 SDK 时保持一致
USER_CLIENT_ID : 用户唯一 ID(例如 UID 或者设备 ID)
USER_CLIENT_NAME : 用户昵称
CHANNEL : 用户初始化渠道(例如 xiaomi、huawei 等)
ENABLE_SYNC_ATTRIBUTION : 是否开启同步获取归因信息,具体请参考同步归因
*/
fun
initGravityEngine
(
application
:
Application
)
{
try
{
// 在主线程中配置并启动SDK
val
config
:
GEConfig
=
GEConfig
.
getInstance
(
application
,
ACCESS_TOKEN
)
// 保存此实例,后续调用方法均需要用到
val
gravityEngineSDKInstance
=
GravityEngineSDK
.
setupAndStart
(
config
)
val
channel
=
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
gravityEngineSDKInstance
.
initialize
(
ACCESS_TOKEN
,
DeviceUuidFactory
().
deviceUuid
.
toString
(),
DeviceUuidFactory
().
deviceUuid
.
toString
(),
channel
,
object
:
InitializeCallback
{
override
fun
onFailed
(
errorMsg
:
String
,
initializeBody
:
JSONObject
?)
{
LogUtil
.
d
(
"mcg --> gravityEngineSDKInstance onFailed="
+
errorMsg
)
}
override
fun
onSuccess
(
responseJson
:
JSONObject
?,
initializeBody
:
JSONObject
?)
{
LogUtil
.
d
(
"mcg --> gravityEngineSDKInstance onSuccess="
+
JsonUtil
.
toJson
(
responseJson
)
)
}
},
ENABLE_SYNC_ATTRIBUTION
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
}
\ No newline at end of file
video/build.gradle
View file @
472989d0
...
@@ -17,6 +17,14 @@ buildscript {
...
@@ -17,6 +17,14 @@ buildscript {
url
"https://artifact.bytedance.com/repository/pangle"
url
"https://artifact.bytedance.com/repository/pangle"
}
}
// 引力引擎 SDK
maven
{
url
'https://nexus.gravity-engine.com/repository/maven-releases/'
}
maven
{
url
'https://nexus.gravity-engine.com/repository/maven-snapshots/'
}
}
}
dependencies
{
dependencies
{
classpath
'com.android.tools.build:gradle:7.1.1'
classpath
'com.android.tools.build:gradle:7.1.1'
...
@@ -40,6 +48,14 @@ allprojects {
...
@@ -40,6 +48,14 @@ allprojects {
maven
{
maven
{
url
"https://artifact.bytedance.com/repository/pangle"
url
"https://artifact.bytedance.com/repository/pangle"
}
}
// 引力引擎 SDK
maven
{
url
'https://nexus.gravity-engine.com/repository/maven-releases/'
}
maven
{
url
'https://nexus.gravity-engine.com/repository/maven-snapshots/'
}
}
}
}
}
...
...
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