# 入门指南

## 前言

要集成并展示Adx3广告，首先要将SDK集成到应用中，并完成相关初始化配置，集成完成后，可选择多种广告格式进行集成展示，请按照文档规则步骤进行实现

## 准备工作

根据以下步骤，完成前期准备

## 应用要满足的前提条件 <a href="#app_prerequisites" id="app_prerequisites"></a>

* 确保 `Android Studio` 3.2 或更高版本
* &#x20;`minSdkVersion`为21 或更高版本 `compileSdkVersion`为28 或更高版本

## 下载最新版本sdk的aar包

[https://pub-block.s3.ap-east-1.amazonaws.com/base/202306/4a579c5d41750549.aar](<https://pub-block.s3.ap-east-1.amazonaws.com/base/202306/4a579c5d41750549.aar&#xA;>)

## 在SSP管理后台申请SDK应用与广告id

{% embed url="<https://ssp.adx3.io>" %}

## 配置您的应用

1. 集成AAR应用包到项目级别`libs`文件夹\
   ![](/files/qHywMDW6icmMgicXiJ72)<br>
2. 在您的项目级别`build.gradle` 文件中添加依赖配置<br>

   ```java
   repositories {
       flatDir {
           dirs 'libs'    
        }
   }
   ```
3. 在项目级别dependencies添加aar包引用\
   &#x20;`api fileTree(dir: 'libs', include: ['*.aar'])`
4. 在应用级别`build.gradle`添加`aar`包依赖\
   `implementation(name: 'adx3sdk',ext:'aar')`
5. 在应用级别`AndroidManifest`注册文件添加网络权限

   ```java
   <uses-permission android:name="android.permission.INTERNET" />
   ```

## 初始化广告SDK

加载广告之前，请先调用`Adx3Ads.initialize()`，最好在`Application`中进行，以便快速初始化SDK不影响开屏等广告快速启动，该方法只用初始化一次后，后续不需要执行，下列代码实例演示在`Applicaiton`如何使用

```java
import android.app.Application;

import io.Adx3.library.Adx3Ads;

public class AdApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        //SSP系统提供sdk管理CODE
        Adx3Ads.initialize(this, CODE);
    }
}
```

以上，您已完成广告SDK初始化操作，后续可根据不同广告格式完成不同广告类型展示

## 选择广告格式

* 横幅广告[横幅广告](/copy-of-cn/jie-kou-wen-dang/android/guang-gao-ge-shi/heng-fu-guang-gao.md)
* 开屏广告[开屏广告](/copy-of-cn/jie-kou-wen-dang/android/guang-gao-ge-shi/kai-ping-guang-gao.md)
* 激励广告[激励广告](/copy-of-cn/jie-kou-wen-dang/android/guang-gao-ge-shi/ji-li-guang-gao.md)
* 插屏广告[插屏广告](/copy-of-cn/jie-kou-wen-dang/android/guang-gao-ge-shi/cha-ping-guang-gao.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.adx3.io/copy-of-cn/jie-kou-wen-dang/android/kai-shi/ru-men-zhi-nan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
