# 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
    }
  }
```
