{"_id":"5b4f06224d1ce2000337df89","project":"54aa7f773b56130b0056c86e","version":{"_id":"55781fe25129590d003ff4f7","project":"54aa7f773b56130b0056c86e","forked_from":"54aa7f773b56130b0056c871","__v":6,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z","categories":["55781fe35129590d003ff4f8","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","55781fe35129590d003ff4fb","55781fe35129590d003ff4fc","55781fe35129590d003ff4fd","55781fe35129590d003ff4fe","564bbc7e8841060d00abb2ee","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","582318b23b961a0f009516a1","594a848c9f4771001a43c959"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Developers","version_clean":"2.0.0","version":"2.0"},"category":{"_id":"582318b23b961a0f009516a1","version":"55781fe25129590d003ff4f7","__v":0,"project":"54aa7f773b56130b0056c86e","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-11-09T12:38:10.993Z","from_sync":false,"order":5,"slug":"cordova-plugin","title":"Cordova Plugin"},"user":"57bc3654b9c7f0220009c77b","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-18T09:19:30.605Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"The list of all methods can be found below.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"/**\\n* Sets the Authorization Data for the app. Authorization Data is later used in API Requests. GCM_APP_ID is required for Android Apps.\\n*/\\nwindow.Pulsate.setAuthorizationData(String APP_ID, String APP_KEY, String GCM_APP_ID);\\n\\n/**\\n* Sets the Authorization Data for the app. Authorization Data is later used in API Requests. PUSH_ENABLED, LOCATION_ENABLED, IS_PULSATE_APP_DELEGATE, IS_PULSATE_NOTIFICATION_DELEGATE by defualt are true. Setting any of these to false will require Developers to add handle all the callback manually.\\n*/\\nwindow.Pulsate.setAuthorizationDataCustom(String APP_ID, String APP_KEY, boolean PUSH_ENABLED, boolean LOCATION_ENABLED, boolean IS_PULSATE_APP_DELEGATE, boolean IS_PULSATE_NOTIFICATION_DELEGATE);\\n\\n/**\\n* Starts Pulsate session lifecycle.\\n* Session starts when the app enters foreground and ends when it goes to background.\\n*/\\nwindow.Pulsate.startPulsateSession(function(success){}, function(error){});\\n\\n/** \\n* Starts Pulsate session lifecycle, for the given user.\\n* Session starts when the app enters foreground and ends when it goes to background.\\n*/\\nwindow.Pulsate.startPulsateSessionForAlias(String alias, function(success){}, function(error){});\\n\\n/**\\n* Logs out the currently logged in user.\\n* To login an user use startPulsateSessionForAlias(String alias).\\n*/\\nwindow.Pulsate.logout(function(success){}, function(error){});\\n\\n/**\\n* Updates the user's first name. Gets updated when entering background.\\n*/\\nwindow.Pulsate.updateFirstName(String firstName);\\n\\n/**\\n* Updates the user's last name. Gets updated when entering background.\\n*/\\nwindow.Pulsate.updateLastName(String lastName);\\n\\n/**\\n* Updates the user's email. Gets updated when entering background.\\n*/\\nwindow.Pulsate.updateEmail(String email);\\n\\n/**\\n* Updates user's age. Gets updated when entering background.\\n*/\\nwindow.Pulsate.updateAge(String age);\\n\\n/**\\n* Updates user's gender. Gets updated when entering background.\\n* Values:\\n* window.Pulsate.PULUserGenderMale\\n* window.Pulsate.PULUserGenderFemale\\n*/\\nwindow.Pulsate.updateGender(Gender gender);\\n\\n/**\\n* Enables / Disables receiving push notifications, by default enabled.\\n*/\\nwindow.Pulsate.setPushNotificationEnabled(boolean enabled);\\n\\n/**\\n* Updates user's privacy. Gets updated in realtime.\\n* Values:\\n* window.Pulsate.PULPrivacyLevelSubscribed\\n* window.Pulsate.PULPrivacyLevelUnsubscribed\\n*/\\nwindow.Pulsate.setPrivacy(Privacy privacy);\\n\\n/**\\n* Creates a custom attribute with a string. Neither can be nil. Gets updated when entering background.\\n*/\\nwindow.Pulsate.createAttributeString(String attributeName, String attributeValue);\\n\\n/**\\n* Creates a custom attribute with a int. Neither can be nil. Gets updated when entering background.\\n*/\\nwindow.Pulsate.createAttributeInt(String attributeName, int attributeValue);\\n\\n/**\\n* Creates a custom attribute with a float. Neither can be nil. Gets updated when entering background.\\n*/\\nwindow.Pulsate.createAttributeFloat(String attributeName, float attributeValue);\\n\\n/**\\n* Creates a custom attribute with a boolean. Neither can be nil. Gets updated when entering background.\\n*/\\nwindow.Pulsate.createAttributeBool(String attributeName, boolean attributeValue);\\n\\n/**\\n* Creates a custom attribute with a date. Neither can be nil. Gets updated when entering background.\\n*/\\nwindow.Pulsate.createAttributeDate(String attributeName, Date attributeValue);\\n\\n/**\\n* Increments given integer attribute by given value. Gets updated when entering background.\\n*/\\nwindow.Pulsate.incrementCounter(String counterName, int value);\\n\\n/**\\n* Decrements given integer attribute by given. Gets updated when entering background.\\n*/\\nwindow.Pulsate.decrementCounter(String counterName, int value);\\n\\n/**\\n* Opens the Pulsate Inbox\\n*/\\nwindow.Pulsate.showFeed ();\\n\\n/**\\n* Sends a custom in app event\\n*/\\nwindow.Pulsate.createEvent(String event);\\n\\n/**\\n* Sends a list of custom in app events\\n*/\\nwindow.Pulsate.createEvents(List<String> events);\\n\\n/**\\n* Attributes synchronize when the app is entering background. This method forces the synchronization to happen instantly.\\n*/\\nwindow.Pulsate.forceAttributeSync();\\n\\n/**\\n* Enables or Disables the New Thread Button in the Pulsate Inbox\\n*/\\nwindow.Pulsate.setNewThreadButtonEnabled(boolean enabled);\\n\\n/**\\n* Enables or Disables sending the user location when a beacon event happens.\\n* By default this it disabled\\n*/\\nwindow.Pulsate.sendLocationWithBeaconEvents(boolean enabled);\\n\\n/**\\n* Enables or Disables sending beacon and geofencing events.\\n* By default enabled\\n*/\\nwindow.Pulsate.setLocationUpdatesEnabled(boolean enabled);\\n\\n/**\\n* Enables or Disables showing in app notifications.\\n* By default enabled\\n*/\\nwindow.Pulsate.enableInAppNotification(boolean enabled);\\n\\n/**\\n* Sets the user to either be authorized or unauthorized to view the inbox.\\n*/\\nwindow.Pulsate.setUserAuthorized(boolean authorized);\\n\\n/**\\n* Shows the last blocked in app notification.\\n*/\\nwindow.Pulsate.showLastInAppNotification();\\n\\n/**\\n* Shows the last blocked inbox action - single card view, inbox entry, thread entry\\n*/\\nwindow.Pulsate.showLastUnauthorizedMessage();\\n\\n/**\\n* Android ONLY.\\n* Sets a listener that receives updates about unread count from Pulsate.\\n* The SDK updates the unread count on 3 events:\\n* 1. On leaving the Pulsate Inbox\\n* 2. On Pulsate Session Start\\n* 3. On getting a Push Notification\\n* Note - This method will always return 0 and will reset unread count if the Pulsate Web App is set to clear unread count on accessing the inbox.\\n*/\\nwindow.Pulsate.setUnreadCountUpdateListener(function(success){});\\n\\n/**\\n* iOS only callbacks for badge updates.\\n*/\\nwindow.Pulsate.onBadgeUpdated(function(result){});\\n\\nwindow.Pulsate.onBadgeDecrementBy(function(result){});\\n\\nwindow.Pulsate.onBadgeIncrementBy(function(result){});\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"cordova-plugin-methods","type":"basic","title":"Cordova Plugin Methods"}

Cordova Plugin Methods


The list of all methods can be found below. [block:code] { "codes": [ { "code": "/**\n* Sets the Authorization Data for the app. Authorization Data is later used in API Requests. GCM_APP_ID is required for Android Apps.\n*/\nwindow.Pulsate.setAuthorizationData(String APP_ID, String APP_KEY, String GCM_APP_ID);\n\n/**\n* Sets the Authorization Data for the app. Authorization Data is later used in API Requests. PUSH_ENABLED, LOCATION_ENABLED, IS_PULSATE_APP_DELEGATE, IS_PULSATE_NOTIFICATION_DELEGATE by defualt are true. Setting any of these to false will require Developers to add handle all the callback manually.\n*/\nwindow.Pulsate.setAuthorizationDataCustom(String APP_ID, String APP_KEY, boolean PUSH_ENABLED, boolean LOCATION_ENABLED, boolean IS_PULSATE_APP_DELEGATE, boolean IS_PULSATE_NOTIFICATION_DELEGATE);\n\n/**\n* Starts Pulsate session lifecycle.\n* Session starts when the app enters foreground and ends when it goes to background.\n*/\nwindow.Pulsate.startPulsateSession(function(success){}, function(error){});\n\n/** \n* Starts Pulsate session lifecycle, for the given user.\n* Session starts when the app enters foreground and ends when it goes to background.\n*/\nwindow.Pulsate.startPulsateSessionForAlias(String alias, function(success){}, function(error){});\n\n/**\n* Logs out the currently logged in user.\n* To login an user use startPulsateSessionForAlias(String alias).\n*/\nwindow.Pulsate.logout(function(success){}, function(error){});\n\n/**\n* Updates the user's first name. Gets updated when entering background.\n*/\nwindow.Pulsate.updateFirstName(String firstName);\n\n/**\n* Updates the user's last name. Gets updated when entering background.\n*/\nwindow.Pulsate.updateLastName(String lastName);\n\n/**\n* Updates the user's email. Gets updated when entering background.\n*/\nwindow.Pulsate.updateEmail(String email);\n\n/**\n* Updates user's age. Gets updated when entering background.\n*/\nwindow.Pulsate.updateAge(String age);\n\n/**\n* Updates user's gender. Gets updated when entering background.\n* Values:\n* window.Pulsate.PULUserGenderMale\n* window.Pulsate.PULUserGenderFemale\n*/\nwindow.Pulsate.updateGender(Gender gender);\n\n/**\n* Enables / Disables receiving push notifications, by default enabled.\n*/\nwindow.Pulsate.setPushNotificationEnabled(boolean enabled);\n\n/**\n* Updates user's privacy. Gets updated in realtime.\n* Values:\n* window.Pulsate.PULPrivacyLevelSubscribed\n* window.Pulsate.PULPrivacyLevelUnsubscribed\n*/\nwindow.Pulsate.setPrivacy(Privacy privacy);\n\n/**\n* Creates a custom attribute with a string. Neither can be nil. Gets updated when entering background.\n*/\nwindow.Pulsate.createAttributeString(String attributeName, String attributeValue);\n\n/**\n* Creates a custom attribute with a int. Neither can be nil. Gets updated when entering background.\n*/\nwindow.Pulsate.createAttributeInt(String attributeName, int attributeValue);\n\n/**\n* Creates a custom attribute with a float. Neither can be nil. Gets updated when entering background.\n*/\nwindow.Pulsate.createAttributeFloat(String attributeName, float attributeValue);\n\n/**\n* Creates a custom attribute with a boolean. Neither can be nil. Gets updated when entering background.\n*/\nwindow.Pulsate.createAttributeBool(String attributeName, boolean attributeValue);\n\n/**\n* Creates a custom attribute with a date. Neither can be nil. Gets updated when entering background.\n*/\nwindow.Pulsate.createAttributeDate(String attributeName, Date attributeValue);\n\n/**\n* Increments given integer attribute by given value. Gets updated when entering background.\n*/\nwindow.Pulsate.incrementCounter(String counterName, int value);\n\n/**\n* Decrements given integer attribute by given. Gets updated when entering background.\n*/\nwindow.Pulsate.decrementCounter(String counterName, int value);\n\n/**\n* Opens the Pulsate Inbox\n*/\nwindow.Pulsate.showFeed ();\n\n/**\n* Sends a custom in app event\n*/\nwindow.Pulsate.createEvent(String event);\n\n/**\n* Sends a list of custom in app events\n*/\nwindow.Pulsate.createEvents(List<String> events);\n\n/**\n* Attributes synchronize when the app is entering background. This method forces the synchronization to happen instantly.\n*/\nwindow.Pulsate.forceAttributeSync();\n\n/**\n* Enables or Disables the New Thread Button in the Pulsate Inbox\n*/\nwindow.Pulsate.setNewThreadButtonEnabled(boolean enabled);\n\n/**\n* Enables or Disables sending the user location when a beacon event happens.\n* By default this it disabled\n*/\nwindow.Pulsate.sendLocationWithBeaconEvents(boolean enabled);\n\n/**\n* Enables or Disables sending beacon and geofencing events.\n* By default enabled\n*/\nwindow.Pulsate.setLocationUpdatesEnabled(boolean enabled);\n\n/**\n* Enables or Disables showing in app notifications.\n* By default enabled\n*/\nwindow.Pulsate.enableInAppNotification(boolean enabled);\n\n/**\n* Sets the user to either be authorized or unauthorized to view the inbox.\n*/\nwindow.Pulsate.setUserAuthorized(boolean authorized);\n\n/**\n* Shows the last blocked in app notification.\n*/\nwindow.Pulsate.showLastInAppNotification();\n\n/**\n* Shows the last blocked inbox action - single card view, inbox entry, thread entry\n*/\nwindow.Pulsate.showLastUnauthorizedMessage();\n\n/**\n* Android ONLY.\n* Sets a listener that receives updates about unread count from Pulsate.\n* The SDK updates the unread count on 3 events:\n* 1. On leaving the Pulsate Inbox\n* 2. On Pulsate Session Start\n* 3. On getting a Push Notification\n* Note - This method will always return 0 and will reset unread count if the Pulsate Web App is set to clear unread count on accessing the inbox.\n*/\nwindow.Pulsate.setUnreadCountUpdateListener(function(success){});\n\n/**\n* iOS only callbacks for badge updates.\n*/\nwindow.Pulsate.onBadgeUpdated(function(result){});\n\nwindow.Pulsate.onBadgeDecrementBy(function(result){});\n\nwindow.Pulsate.onBadgeIncrementBy(function(result){});", "language": "javascript" } ] } [/block]