SurveySparrow SDK enables you to collect feedback from your mobile app. Embed the Classic, Chat & NPS surveys in your ionic application seamlessly with few lines of code.
npm install surveysparrow-ionic-pluginSurveySparrow SDK enables you to collect feedback from your mobile app. Embed the Classic, Chat & NPS surveys in your Ionic application seamlessly with few lines of code.
``bash`
npm install surveysparrow-ionic-plugin
npx cap sync
To use this plugin, ensure the following permissions are added to your app:
Add this in your root build.gradle at the end of repositories:
`gradle`
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add these permissions to your AndroidManifest.xml:
`xml`
Add the necessary permissions to your Info.plist:
`xml`
Based on the survey type being used, ensure the necessary permissions (e.g., for photos, videos, audio, or storage) are added to your app's configuration.
loadFullScreenSurvey(...)
loadFullScreenSurveyWithValidation(...)
`typescript`
loadFullScreenSurvey(options: { domain: String; token: String; params: Object; properties: Object; }) => Promise
| Param | Type |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | { domain: String; token: String; params: Object; properties: Object; } |
--------------------
`typescript`
loadFullScreenSurveyWithValidation(options: { domain: String; token: String; params: Object; properties: Object; }) => Promise
| Param | Type |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| options | { domain: String; token: String; params: Object; properties: Object; } |
--------------------
Validations include Limit Submission Per User and Survey Throttling.
To achieve this, the emailaddress of the user must be passed in the params object.
The params object allows passing survey variables, which can be accessed in the survey's end-user interface. Ensure that the spelling of survey variables matches the configured values. Additionally, make sure to include the emailaddress field for validations.
The properties object includes the following parameters:
1. isCloseButtonEnabled (default: true) false
- If set to , the close button will be removed.
- Note: Disabling this option will also disable the survey validation.
2. langCode (default: en`)
- To load the survey in a specific language, pass the corresponding language code.
- Ensure that the language is configured in the SurveySparrow app.
- A list of supported language codes can be found here.