> For the complete documentation index, see [llms.txt](https://docs.adx3.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adx3.io/interface-documentation/andriod/ad-formats/rewarded.md).

# Rewarded

Rewarded ads are suitable for users who need to obtain rewards, complete full-screen ad viewing, guide users to continue using within the specified time, and obtain in-app rewards after the display is completed. This guide completes the user's integration and configuration of rewarded ads in the app.

### Before you begin <a href="#before_you_begin" id="before_you_begin"></a>

You should finish the step of the [**Guide**](/interface-documentation/andriod/start/getting-started-guide.md) first.

## Initialization

```java
Adx3RewardAdView view = new Adx3RewardAdView(this,"UnitID");
```

## Set ad form orientation

**0**-vertical **1**-horizontal; the default orientation of the ad slot is vertical; the user can configure it according to the specific business; and the user can skip the current operation.

```java
view.setOpt(0); 
```

{% hint style="info" %}
After the rewarded advertisement is displayed, the user needs to complete their own business according to the playback completion callback, such as rewarding the user after the playback is completed and it automatically recycles and closes the advertisement after completion.
{% endhint %}

## Advertising event monitoring settings

```java
view.setListener(new AdListener() {
            @Override
            public void show() {

            }

            @Override
            public void loadFaild() {

            }

            @Override
            public void loadSucces() {

            }

            @Override
            public void adClose() {
                //finish();
            }

            @Override
            public void adClick() {
            }

            @Override
            public void adComplate() {
                ToastUtil.toast(getApplicationContext(),"Reward AD is complate");
            }

            @Override
            public void adSkip() {

            }

            @Override
            public void clickUrl(String url) {

            }
        });
```

[Event listener description reference](/interface-documentation/andriod/ad-formats/banner.md#operation-callback-method-description-and-introduction)

## LoadAd

```java
view.loadAd();
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.adx3.io/interface-documentation/andriod/ad-formats/rewarded.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
