Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fairyland_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_fairyland_pro
Commits
7679d37c
Commit
7679d37c
authored
Mar 22, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.5提交
parent
5da9d27c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
49 deletions
+4
-49
build.gradle
app/build.gradle
+2
-2
TouTiaoRangersManager.kt
...java/com/mints/fairyland/manager/TouTiaoRangersManager.kt
+0
-47
AboutusActivity.kt
.../java/com/mints/fairyland/ui/activitys/AboutusActivity.kt
+2
-0
No files found.
app/build.gradle
View file @
7679d37c
...
@@ -9,8 +9,8 @@ android {
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.mints.fairyland"
applicationId
"com.mints.fairyland"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
4
versionCode
5
versionName
"1.0.
4
"
versionName
"1.0.
5
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
...
app/src/main/java/com/mints/fairyland/manager/TouTiaoRangersManager.kt
deleted
100644 → 0
View file @
5da9d27c
package
com.mints.fairyland.manager
import
android.app.Application
import
android.text.TextUtils
import
com.bytedance.embedapplog.AppLog
import
com.bytedance.embedapplog.InitConfig
import
com.bytedance.embedapplog.util.UriConfig
import
com.bytedance.hume.readapk.HumeSDK
import
com.mints.fairyland.BuildConfig
import
com.mints.fairyland.MintsApplication
import
com.mints.fairyland.manager.ChannelManager
import
com.mints.library.utils.CommonUtils
/**
* 描述:巨量引擎
*/
object
TouTiaoRangersManager
{
private
const
val
APP_ID
=
"208609"
/**
* 初始化
*
* 只有头条分包才初始化
*/
fun
init
(
application
:
Application
)
{
try
{
var
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(
channel
.
contains
(
ChannelManager
.
CHANNEL_TOUTIAO
))
{
// 穿山甲分包渠道
val
ttChannel
=
HumeSDK
.
getChannel
(
MintsApplication
.
getContext
())
if
(!
TextUtils
.
isEmpty
(
ttChannel
))
{
// appid和渠道,appid须保证与广告后台申请记录一致,渠道可自定义,如有多个马甲包建议设置渠道号唯一标识一个马甲包。
val
config
=
InitConfig
(
APP_ID
,
channel
+
"_"
+
ttChannel
)
// 域名默认国内: DEFAULT
config
.
setUriConfig
(
UriConfig
.
DEFAULT
);
// 是否在控制台输出日志,可用于观察用户行为日志上报情况,建议仅在调试时使用,release版本请设置为false !
AppLog
.
setEnableLog
(
BuildConfig
.
DEBUG
)
AppLog
.
init
(
application
,
config
)
}
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/fairyland/ui/activitys/AboutusActivity.kt
View file @
7679d37c
...
@@ -8,6 +8,7 @@ import com.mints.fairyland.MintsApplication
...
@@ -8,6 +8,7 @@ import com.mints.fairyland.MintsApplication
import
com.mints.fairyland.R
import
com.mints.fairyland.R
import
com.mints.fairyland.common.AppConfig
import
com.mints.fairyland.common.AppConfig
import
com.mints.fairyland.common.Constant
import
com.mints.fairyland.common.Constant
import
com.mints.fairyland.common.DeviceInfo
import
com.mints.fairyland.ui.activitys.base.BaseActivity
import
com.mints.fairyland.ui.activitys.base.BaseActivity
import
com.mints.fairyland.utils.ToastUtil
import
com.mints.fairyland.utils.ToastUtil
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.CommonUtils
...
@@ -36,6 +37,7 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
...
@@ -36,6 +37,7 @@ class AboutusActivity : BaseActivity(), View.OnClickListener {
ivAboutasIcon
.
setOnLongClickListener
{
ivAboutasIcon
.
setOnLongClickListener
{
ToastUtil
.
showLong
(
MintsApplication
.
getContext
(),
"自有渠道:"
+
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
+
ToastUtil
.
showLong
(
MintsApplication
.
getContext
(),
"自有渠道:"
+
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
+
"\n 广告代码位:"
+
AppConfig
.
user_channel_ad
+
"\n 广告代码位:"
+
AppConfig
.
user_channel_ad
+
"\n versionCode:"
+
DeviceInfo
.
instance
.
versionCode
+
"\n 头条渠道:"
+
HumeSDK
.
getChannel
(
context
))
"\n 头条渠道:"
+
HumeSDK
.
getChannel
(
context
))
true
true
}
}
...
...
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