Code Monkey home page Code Monkey logo

flat-max-adapter's Introduction

Flat-Max-Adapter

发版记录

版本 发布时间 更新内容
1.4.18.2 2024-02-23 发布第一个版本
1.5.0.3 2024-04-19 更新新样式

引入Adapter

首先在项目级build.gradle文件加入maven远程依赖地址,如下:

buildscript {
    repositories {
        maven { url "https://maven-pub.flat-ads.com/repository/maven-public/"}
        maven { url "https://jitpack.io" }
    }
}
allprojects {
    repositories {
        maven { url "https://maven-pub.flat-ads.com/repository/maven-public/"}
        maven { url "https://jitpack.io" }
    }
}

然后再Module的build.gradle中引入Max Adapter的包,根据项目情况选择

// 必须导入
implementation 'com.flatads.adapter:max:1.4.18.2'

// 以下按渠道导入
// GP
implementation 'com.flatads.sdk:flatads:1.5.0.3-GP'

// 线下
implementation 'com.flatads.sdk:flatads:1.5.0.3'

在Max用户界面中定义Adapter

  1. 创建NetWork类名: com.flatads.adapter.max.FlatAdsMediationAdapter

  2. 配置广告位ID

    • Placement ID 输入FlatAds配置好的广告位ID,如:6af5ffa0-bb5e-11ed-af5d-07a5f3732048
    • Custom Parameters 输入FlatAds后台申请好的 app_id 和 app_token,使用Json格式输入,如:{ "app_id":"YOUR_APP_ID" , "app_token":"YUOR_APP_TOKEN" }
  3. 以上配置完成后,点击保存即可。注意:生效时间,需要等待30~60分钟左右。

注意事项:

  1. Banner 广告,需要在 BannerView回调onAdLoaded时候再添加在布局上,否则Max会触发两次Banner加载,导致广告无效请求。

flat-max-adapter's People

Contributors

flatads avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.