# Android Survey SDK

### Find Github Project: [QwarySurveyAndroid](https://github.com/manoj-qwary/QWarySurveyAndroid)

{% embed url="<https://vimeo.com/760580893?utm_campaign=Mobile+APP+SDK+Announcements&utm_content=Introducing+Qwary%27s+new+mobile+app+SDK+for+in-app+feedback+%F0%9F%99%8C&utm_medium=email&utm_source=encharge>" %}
Video Instruction for setting up Android Survey SDK
{% endembed %}

### Example

Create a QwarySurvey Builder Object

```java
Survey builder = new Survey.Builder()
```

Then set the fields you want.

```java
  new Survey.Builder()
                .setActivity(this)
                .setDomain("domain_url")
                .setToken("survey_token")
                .setLoader(true) //For loading bar visibility
                .setModal(false) //For full and half view
                .setStartAfter(TimeUnit.MINUTES.toMillis(1L)) //To start survey after 1 minute
                .prepare();
```

To add query params like this.

```java
  new Survey.Builder()
                .setActivity(this)
                .setDomain("domain_url")
                .setToken("survey_token")
                .setParam("email", "abc@gmail.com")
                .setParam("planId", "plan1")
                .showNow();
```

You can prepare the schedule survey to start after HOURS or DAYS

```java
.setStartAfter(TimeUnit.HOURS.toMillis(1L)) //To start after 1 hour
.setStartAfter(TimeUnit.DAYS.toMillis(1L)) //To start after 1 day
```

To show the the survey at once without any delay

```java
  new Survey.Builder()
                .setActivity(this)
                .setDomain("domain_url")
                .setToken("survey_token")
                .showNow();
```

To remove the specific survey from schedule

```java
new Survey.Builder().setActivity(this).clear("token");
```

Add below into app gradle

```java
  android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
  }
```


---

# 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://help.qwary.com/product-guide/installation/mobile-app-sdk/android-survey-sdk.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.
