优化说明
This commit is contained in:
parent
2549629a8b
commit
14f2f9f5a9
29
README.md
29
README.md
|
|
@ -1,16 +1,28 @@
|
||||||
# 广告模块集成指南
|
# 广告模块集成指南
|
||||||
|
|
||||||
#### 1.0.0:
|
#### 版本 1.0.0
|
||||||
#### 1.0.0:
|
#### 项目gradle
|
||||||
|
```java
|
||||||
|
maven {
|
||||||
|
url "http://124.221.136.193:3000/app-lib/JKBaseLib/raw/master/maven"
|
||||||
|
allowInsecureProtocol = true // 允许HTTP
|
||||||
|
metadataSources {
|
||||||
|
artifact() // 强制校验POM文件
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 模块的gradle
|
||||||
|
```java
|
||||||
|
implementation ('com.your.group:lib-name:1.0.0@aar') {
|
||||||
|
transitive = true // 确保嵌套依赖被加载
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### 基础配置(必填项)
|
### 基础配置(必填项)
|
||||||
```java
|
```java
|
||||||
new AdApp.Builder(this, Constants.APP_NAME, getChannel(), getAppSplash())
|
new AdApp.Builder(this, Constants.APP_NAME, getChannel(), getAppSplash())
|
||||||
.addSlot(AD_CODE_SPLASH, "splash_id") // 开屏广告位
|
|
||||||
.addSlot(AD_CODE_REWARD, "reward_id") // 激励视频广告位
|
|
||||||
.addSlot(AD_CODE_FEED, "feed_id") // 信息流广告位
|
|
||||||
.addSlot(AD_CODE_BANNER, "banner_id") // Banner广告位
|
|
||||||
|
|
||||||
.addSlot(AD_APPID, "app_id") // APPID
|
.addSlot(AD_APPID, "app_id") // APPID
|
||||||
.addSlot(AD_CSJID, "csj_id") // CSJID
|
.addSlot(AD_CSJID, "csj_id") // CSJID
|
||||||
.addSlot(AD_CODE_SPLASH, "splash_id") // 添加横幅广告位
|
.addSlot(AD_CODE_SPLASH, "splash_id") // 添加横幅广告位
|
||||||
|
|
@ -44,8 +56,9 @@ new AdApp.Builder(this, Constants.APP_NAME, getChannel(), getAppSplash())
|
||||||
- 隐私合规:确保用户已同意隐私政策
|
- 隐私合规:确保用户已同意隐私政策
|
||||||
- 版本兼容:最低支持Android 7.0(API 24)
|
- 版本兼容:最低支持Android 7.0(API 24)
|
||||||
|
|
||||||
### 初始化失败监听-->重新请求广告开关
|
### 广告开关初始化失败监听
|
||||||
```java
|
```java
|
||||||
|
// 重新请求广告开关
|
||||||
ADStateUtils.setSwitchRequestListener(new ADStateUtils.SwitchRequestListener() {
|
ADStateUtils.setSwitchRequestListener(new ADStateUtils.SwitchRequestListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSwitchRequestChanged() {
|
public void onSwitchRequestChanged() {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue