Pollfish
Pollfish Ionic Native plugin wrapper
https://github.com/pollfish/cordova-plugin-pollfish
Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.
Installation#
- Capacitor
- Cordova
- Enterprise
$ npm install com.pollfish.cordova_plugin $ npm install @ionic-native/pollfish $ ionic cap sync
$ ionic cordova plugin add com.pollfish.cordova_plugin $ npm install @ionic-native/pollfish
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
#
Supported Platforms- Android
- iOS
#
Usage#
ReactLearn more about using Ionic Native components in React
#
Angularimport { Pollfish } from '@ionic-native/pollfish/ngx';
constructor(private pollfish: Pollfish) { }
...
this.pollfish.init(false, false, 'YOUR_API_KEY', 1, 8, 'REQUEST_UUID', false);
this.pollfish.initWithUserAttributes(false, false, 'YOUR_API_KEY', 1, 8, 'REQUEST_UUID', false, { 'gender': '1', ...});
this.pollfish.showPollfish();
this.pollfish.hidePollfish();
// Event Listeners
this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishSurveyReceived, (surveyInfo) => { console.log("Survey Received: " + JSON.stringify(surveyInfo));});
this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishSurveyCompleted, (result) => { console.log("Survey Completed: " + JSON.stringify(surveyInfo));});
this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishUserNotEligible, (_) => { console.log("Pollfish User Not Eligible");});
this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishSurveyNotAvailable, (_) => { console.log("Pollfish Survey not available");});
this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishOpened, (_) => { console.log("Pollfish Survey panel is open");});
this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishClosed, (_) => { console.log("Pollfish Survey panel is closed");});
this.pollfish.setEventCallback(pollfish.EventListener.OnPollfishUserRejectedSurvey, (_) => { console.log("Pollfish User Rejected Survey");});