apptentive / apptentive-cordova

A plugin for Cordova that lets your app be Apptentive.
https://learn.apptentive.com/knowledge-base/integrating-the-apptentive-cordova-sdk-plugin/
BSD 3-Clause "New" or "Revised" License
3 stars 13 forks source link

Surveys not working. #38

Closed aniruddhasm closed 6 years ago

aniruddhasm commented 6 years ago

Hello,

I am trying to integrate surveys in the app. My app is already deployed on app store. I am trying to push an update with this survey feature I have created survey and add the code below.

home.html

<button ng-click="buttonclick"></button>

home.js

$scope.buttonclick = function(){
            function successCallback(e){
                alert("Success--"+JSON.stringify(e)); // I am always getting this as Success -- false.
            }
            function errorCallback(e){
                alert("Error--"+JSON.stringify(e));
            }
            var customData = {};
            Apptentive.engage(successCallback, errorCallback, 'buttonclick', customData);
        }

Here buttonclick is my unique event that will going to trigger the survey. I am always getting successCallback alert as Success -- false.

Please help I am stuck here from a long time.