Android SDK

What is the minimum required Android version?

The minimum Android version required is 21. Also, the compile SDK version version for android is 31 (But you should generally compile with the latest version)


Including CX Lib into your project

arrow_rightIntegration From Maven Repository

                The SDK is available from the central Maven repo. Add it in your root settings.gradle.
                    dependencyResolutionManagement {
	                    repositories {
		                    ...
		                    maven { url 'https://jitpack.io' }
	                    }
                    }
            
                Add a reference to the latest version of QuestionPro SDK in your app's build.gradle. 
                    dependencies {
                        implementation 'com.github.surveyanalyticscorp:android-cx:1.2.8'
                    }
                    

Modify your manifest:

arrow_rightAdd following permissions

                      <uses-permission android:name="android.permission.INTERNET"/>
                      <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
                
arrow_rightAdd API Key

                          Add the api key obtained from QuestionPro portal:
                            <meta-data android:name="cx_manifest_api_key"
                                       android:value="your api key here"/>
                    
arrow_rightAdd the following activity to show the feedback screen

                            <activity android:name="com.questionpro.cxlib.interaction.InteractionActivity"
                                      android:theme="@android:style/Theme.Translucent.NoTitleBar"
                                      android:configChanges="keyboardHidden"
                                      android:windowSoftInputMode="adjustPan"/>
                                
                        

Adding TouchPoint hook in app codebase

arrow_right Initialization of SDK and launch feedback Survey

                    You have to initialize the SDK in the base Activity, For example:
                        TouchPoint touchPoint=new TouchPoint.Builder(Type.CUSTOMER_EXPERIENCE)
                        .build();
                        QuestionProCX.init(CurrentActivity.this, touchPoint);
(Here The Type.CUSTOMER_EXPERIENCE is to use the feedback survey from QuestionPro CX and Type.SURVEY is to use the survey from QuestionPro.) You can add touchpoint hook wherever you want to show the feedback screen. For example: QuestionProCX.launchFeedbackSurvey(SURVEY_ID); (Here the SURVEY_ID which is obtained from QuestionPro platform.)
arrow_right Additional configuration setup (Optional)

                    TouchPoint touchPoint = new TouchPoint.Builder(Type.CUSTOMER_EXPERIENCE)
				        .email("respondent_email_id")
				        .firstName("respondent_name")
				        .lastName("respondent_last_name")
				        .showAsDialog(false)//Whether you want to feedback survey as a dialog on full screen.
				        .themeColor("#0000FF")
				        .transactionLanguage("English")
				        .build();