Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kalvadtech/customerpulse-android

The Customer Pulse Android library and Example of how to use it
https://github.com/kalvadtech/customerpulse-android

Last synced: 3 days ago
JSON representation

The Customer Pulse Android library and Example of how to use it

Awesome Lists containing this project

README

        

# CustomerPulseSurveyAndroid
The Customer Pulse Android library and Example of how to use it

# CustomerPulseSurvey
is a module written in java used to implement Customer Pulse Survey in android applications.

## Installation

add file CustomerPulseSurvey.aar to your libs directory in your android project and make sure your libs folder is added in your project dependencies as JAR/AAR dependencies.

### Steps

1.add CustomerPulseSurvey.aar file to your libs folder inside app folder

2.from file menu open project structure

3.in left side select Dependencies

4.In modules select app tab

5.In declered dependencies click on the plus "+" icons and select JAR/AAR Dependency

5.In step 1 add your libs folder name if you follow from step 1 it should be libs

6.Press Ok button then Apply to save change.

## Usage

### Parameters



Name
Type
Description
Default



context
Context
opened activity context




app_id
String
holds the application id provided by the Customer Pulse Survey provider




link_or_token
String
holds the linking_id or the token provided by the Customer Pulse Survey provider




options
HashMap
holds all the options needed by the Customer Pulse Survey provider such as lang




closeDelayInMs
Integer
time to wait before closing the survey after finish in milliseconds
2000 (2 seconds)



dismissible
Boolean
enable or disable closing the survey by the user
true

to set language add language code to hashmap with key lang

```bash
HashMap options = new HashMap<>();
options.put("lang", "ar");
```

### Use Customer Pulse Survey page
add customer pulse as a stand alone page by calling method showSurveyPage(Context context, String app_id, String link_or_token, HashMap options, boolean dismissible, int closingDelayInMs)

using default values for dismissible and closeDelayInMs
```bash
CustomerPulseSurvey.showSurveyPage(context, app_id, link_or_token, options,)
```

to change closeDelayInMs only use
```bash
CustomerPulseSurvey.showSurveyPage(context, app_id, link_or_token, options, closeDelayInMs)
```

to change dismissible only use
```bash
CustomerPulseSurvey.showSurveyPage(context, app_id, link_or_token, options, dismissible)
```

to change both use
```bash
CustomerPulseSurvey.showSurveyPage(context, app_id, link_or_token, options, dismissible, closeDelayInMs)
```



### Use Customer Pulse Survey bottom sheet dialog
add customer pulse as a bottom sheet dialog by calling method showSurveyBottomSheet(Context context, String app_id, String link_or_token, HashMap options, boolean dismissible, int closingDelayInMs)

using default values for dismissible and closeDelayInMs
```bash
CustomerPulseSurvey.showSurveyBottomSheet(context, app_id, link_or_token, options)
```

to change closeDelayInMs only use
```bash
CustomerPulseSurvey.showSurveyBottomSheet(context, app_id, link_or_token, options, closingDelayInMs)
```

to change dismissible only use
```bash
CustomerPulseSurvey.showSurveyBottomSheet(context, app_id, link_or_token, options, dismissible)
```

to change both use
```bash
CustomerPulseSurvey.showSurveyBottomSheet(context, app_id, link_or_token, options, dismissible, closingDelayInMs)
```


to enable user closing bottom sheet set dismissible to true

```bash
CustomerPulseSurvey.showSurveyBottomSheet(context, app_id, link_or_token, options, true, closeDelayInMs)
```