Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
smsrocky committed May 8, 2021
0 parents commit 2aca54c
Show file tree
Hide file tree
Showing 261 changed files with 17,316 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/----.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: 功能建议
about: 说出你对项目的建议
title: ''
labels: enhancement
assignees: ifmvo

---

**你的建议基于你遇到什么问题?**


**你希望怎样改进?**
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug--.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug反馈
about: 说出你遇到的问题
title: '例: 开屏广告倒计时结束后发生崩溃'
labels: bug
assignees: ifmvo

---

**Bug 描述和日志**


**Bug 复现的步骤**
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**截图**
如果Bug展示较为明显,最好附上截图

**系统版本以及设备型号**
- 设备型号:华为Mate40Pro]
- 系统版本:Android11
- TogetherAd版本:
implementation 'com.matthewchen.togetherad:csj:x.x.x-x.x.x.x'
implementation 'com.matthewchen.togetherad:gdt:x.x.x-x.xxx.xxxx'
implementation 'com.matthewchen.togetherad:baidu:x.x.x-x.xx'

**附加信息**
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copy from Alibaba open source

# Built application files

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
# local.properties
.classpath
.project
.settings/

# Proguard folder generated by Eclipse
proguard/

#Log Files
*.log

# OS X
.DS_Store

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear
*.iml

# IDEA Files
.idea/
.svn/
out/

# MAVEN COMPILE Files
target/
lint.xml
local.properties

deploy.gradle
jcenterDeploy.gradle
jcenterInstall.gradle
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 陈铭卓

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
132 changes: 132 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# TogetherAd

TogetherAd 是由 Kotlin 编写的 Android 广告聚合开源项目。

能够帮助 Android 开发者``快速````便捷````灵活````接入并使用`` 国内多家主流广告 SDK。

TogetherAd 也是一种将各个广告提供商``组件化处理``的解决方案。

默认提供了三家广告提供商:``字节的穿山甲````腾讯的优量汇````百度的百青藤``

如果这三家满足不了你的需求,还需要其他家广告提供商,可参考[扩展文档](doc/extend.md)

TogetherAd 也提供了很多自定义功能,比如:``按权重分发广告````失败切换````超时时间````自定义图片加载器````热启动开屏广告解决方案``等...

### 安装 Demo

微信扫描底部二维码,回复 ``apk`` 可下载 Demo Apk 尝鲜

### Gradle 添加依赖

项目根目录下的 build.gradle 文件中添加 ``JitPack`` 仓库

```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```

``core``是必选,其他3个根据自身需求``任选``1 ~ 3个组合搭配

```gradle
dependencies {
//核心库( 必要 )
implementation 'com.github.ifmvo.TogetherAd:core:5.0.3'
//优量汇( 腾讯广点通 )可选
implementation 'com.github.ifmvo.TogetherAd:gdt:5.0.3'
//穿山甲( 头条 )可选
implementation 'com.github.ifmvo.TogetherAd:csj:5.0.3'
//百青藤 ( 百度 Mob ) 可选
implementation 'com.github.ifmvo.TogetherAd:baidu:5.0.3'
}
```

> 对应版本:穿山甲3.6.1.1;优量汇4.351.1221;百度5.91
### 使用方法

- [特色功能](doc/feature.md)

- [准备工作及初始化](doc/prepare.md)

- [开屏广告](doc/splash.md)

- [Banner横幅广告](doc/banner.md)

- [Interstitial插屏广告](doc/inter.md)

- [原生模板](doc/express.md)

- [原生自渲染](doc/native.md)

- [激励广告](doc/reward.md)

- [全屏视频广告](doc/full_video.md)

- [混合使用](doc/hybrid.md)

- [扩展](doc/extend.md)

- [常见问题](doc/question.md)

- [版本更新日志](doc/update_log.md)

### 混淆 proguard-rules.pro

资源库中已自带混淆规则,通常情况下无需手动配置。

当然你也可以点击这里查看每个资源库的混淆规则: [core](core/proguard-rules.pro)[gdt](gdt/proguard-rules.pro)[csj](csj/proguard-rules.pro)[baidu](baidu/proguard-rules.pro)

### 相关文档收集

- [优量汇接入文档](https://developers.adnet.qq.com/doc/android/access_doc)

- [优量汇常见问题](https://e.qq.com/dev/help_detail.html?cid=668&pid=2208)

- [优量汇SDK修订历史](https://developers.adnet.qq.com/doc/android/union/union_version)

- [优量汇错误码对照](https://developers.adnet.qq.com/backend/error_code.html)

- [穿山甲文档](http://partner.toutiao.com/doc?id=5dd0fe756b181e00112e3ec5)

- [百青藤v5.88接入文档](https://baidu-ssp.gz.bcebos.com/mssp/sdk/BaiduMobAds_MSSP_bd_SDK_android_v5.88.pdf)

### 有疑问?

微信扫描下面二维码, **关注后点击联系我** 可邀请进微信交流群,更多大佬为你答疑。

<img src="img/qrcode_for_gh_e66be0cfb1f0_258.jpeg" height="200" width="200">

### License

```
MIT License
Copyright (c) 2021 陈铭卓
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
53 changes: 53 additions & 0 deletions baidu/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copy from Alibaba open source

# Built application files

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
# local.properties
.classpath
.project
.settings/

# Proguard folder generated by Eclipse
proguard/

#Log Files
*.log

# OS X
.DS_Store

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear
*.iml

# IDEA Files
.idea/
.svn/
out/

# MAVEN COMPILE Files
target/
lint.xml

deploy.gradle
jcenterDeploy.gradle
jcenterInstall.gradle
40 changes: 40 additions & 0 deletions baidu/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.kezong.fat-aar'

// JitPack Maven
apply plugin: 'com.github.dcendents.android-maven'
// Your Group
group = 'com.github.ifmvo'

android {
compileSdkVersion 28

defaultConfig {
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "5.0.3"
}

lintOptions {
abortOnError false
}

buildTypes {
release {
consumerProguardFiles 'proguard-rules.pro'
}
}

repositories { flatDir { dirs 'libs' } }
}

dependencies {
api fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
// embed(name: 'Baidu_MobAds_SDK-release', ext: 'aar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

api project(':core')
}
Binary file added baidu/libs/Baidu_MobAds_SDK-release.aar
Binary file not shown.
34 changes: 34 additions & 0 deletions baidu/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

#------------------------百度的混淆---------------------------#
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class com.baidu.mobads.** { *; }
-keep class com.baidu.mobad.** { *; }

-keep class com.ifmvo.togetherad.baidu.** { *; }
Loading

0 comments on commit 2aca54c

Please sign in to comment.