Skip to content

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

Notifications You must be signed in to change notification settings

KalvadTech/CustomerPulse-Android

Repository files navigation

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

  HashMap<String, String> 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<String, String> options, boolean dismissible, int closingDelayInMs)

using default values for dismissible and closeDelayInMs

CustomerPulseSurvey.showSurveyPage(context, app_id, link_or_token, options,)

to change closeDelayInMs only use

CustomerPulseSurvey.showSurveyPage(context, app_id, link_or_token, options, closeDelayInMs)

to change dismissible only use

CustomerPulseSurvey.showSurveyPage(context, app_id, link_or_token, options, dismissible)

to change both use

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<String, String> options, boolean dismissible, int closingDelayInMs)

using default values for dismissible and closeDelayInMs

CustomerPulseSurvey.showSurveyBottomSheet(context, app_id, link_or_token, options)

to change closeDelayInMs only use

CustomerPulseSurvey.showSurveyBottomSheet(context, app_id, link_or_token, options, closingDelayInMs)

to change dismissible only use

CustomerPulseSurvey.showSurveyBottomSheet(context, app_id, link_or_token, options, dismissible)

to change both use

CustomerPulseSurvey.showSurveyBottomSheet(context, app_id, link_or_token, options, dismissible, closingDelayInMs)

to enable user closing bottom sheet set dismissible to true

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages