最低限必要なAndroidのバージョンは21
です。また、コンパイルSDKのバージョンは 31
です。(一般的には最新バージョンでコンパイルされるべきです。)
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'
}
Add the api key obtained from QuestionPro portal:
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.)
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();