{"_id":"57bc3bf03335a60e002cbe35","parentDoc":null,"githubsync":"","user":"57bc3654b9c7f0220009c77b","category":{"_id":"55781fe35129590d003ff4fc","pages":["55781fe45129590d003ff50d","55781fe45129590d003ff50e","55781fe45129590d003ff50f","55781fe45129590d003ff510","55781fe45129590d003ff511","55781fe45129590d003ff512","55781fe45129590d003ff513","55781fe45129590d003ff514","55781fe45129590d003ff515","55781fe45129590d003ff516","55f692b4fe4cce21005c78b0","55f7e91e60cc850d008a7a45","56333cab9c607719001b85e4","564462ed9ce94c0d00068ce9","564f54fa48a1df1700836653","565ee9e7413e06170093dde0","5661a8fdb401c70d00dde6fa","5671348860c8e70d006c96a1","568ce9707d3bf02300aa7734"],"version":"55781fe25129590d003ff4f7","__v":10,"project":"54aa7f773b56130b0056c86e","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-01-05T12:44:00.338Z","from_sync":false,"order":4,"slug":"android-sdk","title":"Android SDK"},"__v":1,"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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-23T12:05:04.674Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":22,"body":"All the methods of the PulsateManager can be found below. You can find all these methods in Android Studio - right click on IPulsateManager -> Go To -> Declaration.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"public interface IPulsateManager {\\n\\n   /**\\n     * Starts Pulsate session lifecycle.\\n     * Session starts when the app enters foreground and ends when it goes to background.\\n     */\\n    void startPulsateSession(:::at:::Nullable IPulsateRequestListener requestListener);\\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     *\\n     * @param alias\\n     */\\n    void startPulsateSessionForAlias(String alias, @Nullable IPulsateRequestListener requestListener);\\n\\n    /**\\n     * Enables or Disables Geofencing and Beacon Scanning.\\n     * By default enabled.\\n     */\\n    void setLocationUpdatesEnabled(boolean enabled);\\n\\n    /**\\n     * WORK IN PROGRESS STILL IN BETA\\n     * <p>\\n     * Enables or Disables Microfencing\\n     * For Microfencing to work the GPS Manager must be enabled.\\n     * Microfencing is required to use Polygons.\\n     * Microfencing also causes the app to use significantly more battery.\\n     * By default disabled.\\n     * <p>\\n     * WORK IN PROGRESS STILL IN BETA\\n     */\\n    void setMicrofencingEnabled(boolean enabled);\\n\\n    /**\\n     * Logs out the currently logged in user.\\n     * To login an user use startPulsateSessionForAlias(String alias).\\n     */\\n    void logoutCurrentAlias(IPulsateRequestListener requestListener);\\n\\n    /**\\n     * Enables or Disables In-App Notifications. Default - Enabled\\n     */\\n    void setInAppNotificationEnabled(boolean enabled);\\n\\n    /**\\n     * Shows the last in app notification. In App Notification need to be enabled.\\n     * To enable in app notifications use enableInAppNotification(BOOL).\\n     */\\n    void showLastInAppNotification();\\n\\n    /**\\n     * Disables or Enables push notifications from Pulsate.\\n     *\\n     * @param enabled\\n     */\\n    void setPushNotificationEnabled(boolean enabled);\\n\\n    /**\\n     * Queries the server to check if push notifications are enabled for the given alias\\n     */\\n    boolean isPushNotificationEnabled();\\n\\n    /**\\n     * Sets the user to either be authorized or unauthorized to view the inbox.\\n     */\\n    void setUserAuthorized(boolean authorized);\\n\\n    /**\\n     * Sets a listener that receives callback when an unauthorized action happens.\\n     */\\n    void setUserUnauthorizedListener(IPulsateUserUnauthorizedListener listener);\\n\\n    /**\\n     * Shows the last blocked inbox action - single card view, inbox entry, thread entry\\n     */\\n    void showLastUnauthorizedMessage();\\n\\n    /**\\n     * Enables or Disables the New Thread Button in the Pulsate Inbox\\n     */\\n    void setNewThreadButtonEnabled(boolean enabled);\\n\\n    /**\\n     * Sets the Authorization Data for the app. Authorization Data is later used in API Requests.\\n     *\\n     * @param authorizationData\\n     */\\n    void setAuthorizationData(AuthorizationData authorizationData);\\n\\n    /**\\n     * Enables or Disables sending the user location when a beacon event happens.\\n     * By default this it disabled\\n     *\\n     * @param enabled\\n     */\\n    void sendLocationWithBeaconEvents(boolean enabled);\\n\\n    /**\\n     * Updates the user's first name. Gets updated when entering background.\\n     *\\n     * @param firstName firstName\\n     */\\n    void updateFirstName(String firstName);\\n\\n    /**\\n     * Updates the user's last name. Gets updated when entering background.\\n     *\\n     * @param lastName lastName\\n     */\\n    void updateLastName(String lastName);\\n\\n    /**\\n     * Updates the user's email. Gets updated when entering background.\\n     *\\n     * @param email email\\n     */\\n    void updateEmail(String email);\\n\\n    /**\\n     * Updates user's gender. Gets updated when entering background.\\n     * Values:\\n     * Gender.FEMALE\\n     * Gender.MALE\\n     *\\n     * @param gender user's gender\\n     */\\n    void updateGender(int gender);\\n\\n    /**\\n     * Updates user's age. Gets updated when entering background.\\n     *\\n     * @param age user's age\\n     */\\n    void updateAge(String age);\\n\\n    /**\\n     * Updates user's privacy. Gets updated in realtime.\\n     * Values:\\n     * Privacy.UNSUBSCRIBE\\n     * Privacy.SUBSCRIBE\\n     *\\n     * @param privacy user's privacy\\n     */\\n    void setPrivacy(int privacy);\\n\\n    /**\\n     * Creates a custom attribute with a string. Key can be nil. Gets updated when entering background.\\n     *\\n     * @param attributeName        custom attribute name\\n     * @param attributeValueString attribute value\\n     */\\n    void createAttribute(String attributeName, String attributeValueString);\\n\\n    /**\\n     * Creates a custom attribute with an integer. Key can't be nil. Gets updated when entering background.\\n     *\\n     * @param attributeName     custom attribute name\\n     * @param attributeValueInt attribute value\\n     */\\n    void createAttribute(String attributeName, int attributeValueInt);\\n\\n    /**\\n     * Creates a custom attribute with a float. Key can't be nil. Gets updated when entering background.\\n     *\\n     * @param attributeName       custom attribute name\\n     * @param attributeValueFloat attribute value\\n     */\\n    void createAttribute(String attributeName, float attributeValueFloat);\\n\\n    /**\\n     * Creates custom attribute with a bool. Key can't be nil. Gets updated when entering background.\\n     *\\n     * @param attributeName      custom attribute name\\n     * @param attributeValueBool attribute value\\n     */\\n    void createAttribute(String attributeName, boolean attributeValueBool);\\n\\n    /**\\n     * Creates custom attribute with a date. Key can't be nil. Gets updated when entering background.\\n     *\\n     * @param attributeName      custom attribute name\\n     * @param attributeValueDate attribute value\\n     */\\n    void createAttribute(String attributeName, Date attributeValueDate);\\n\\n    /**\\n     * Sends a custom in app event\\n     *\\n     * @param event event to be sent - can't be nil\\n     */\\n    void createEvent(String event);\\n\\n    /**\\n     * Sends a list of custom in app events\\n     *\\n     * @param events events to be sent - can't be nil\\n     */\\n    void createEvents(List<String> events);\\n\\n    /**\\n     * Increments given integer attribute by given value. Gets updated when entering background.\\n     *\\n     * @param counterName which attribute to increment\\n     * @param value       value to increment by\\n     */\\n    void incrementCounter(String counterName, int value);\\n\\n    /**\\n     * Decrements given integer attribute by given. Gets updated when entering background.\\n     *\\n     * @param counterName custom attribute name\\n     * @param value       attribute value\\n     */\\n    void decrementCounter(String counterName, int value);\\n\\n    /**\\n     * Attributes synchronize when the app is entering background. This method forces the synchronization to happen instantly.\\n     */\\n    void forceAttributeSync();\\n\\n    /**\\n     * Opens the Pulsate Inbox\\n     */\\n    void showFeed();\\n\\n    /**\\n     * Returns the last known location of the user\\n     */\\n    Location getLastKnownLocation();\\n\\n    /**\\n     * Sets a listener that receives enter/exit/dwell geofence callbacks from Pulsate.\\n     *\\n     * @param listener listener that will receive callbacks from Pulsate\\n     */\\n    void setGeofenceListener(IPulsateGeofenceListener listener);\\n\\n    /**\\n     * Sets a listener that receives beacon range callbacks from Pulsate.\\n     *\\n     * @param listener listener that will receive callbacks from Pulsate\\n     */\\n    void setBeaconRangeNotifier(IPulsateBeaconRangeNotifierListener listener);\\n\\n    /**\\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     */\\n    void setUnreadCountUpdateListener(IPulsateUnreadCountUpdateListener listener);\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"pulsatemanager-methods","type":"basic","title":"PulsateManager Methods"}

PulsateManager Methods


All the methods of the PulsateManager can be found below. You can find all these methods in Android Studio - right click on IPulsateManager -> Go To -> Declaration. [block:code] { "codes": [ { "code": "public interface IPulsateManager {\n\n /**\n * Starts Pulsate session lifecycle.\n * Session starts when the app enters foreground and ends when it goes to background.\n */\n void startPulsateSession(@Nullable IPulsateRequestListener requestListener);\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 *\n * @param alias\n */\n void startPulsateSessionForAlias(String alias, @Nullable IPulsateRequestListener requestListener);\n\n /**\n * Enables or Disables Geofencing and Beacon Scanning.\n * By default enabled.\n */\n void setLocationUpdatesEnabled(boolean enabled);\n\n /**\n * WORK IN PROGRESS STILL IN BETA\n * <p>\n * Enables or Disables Microfencing\n * For Microfencing to work the GPS Manager must be enabled.\n * Microfencing is required to use Polygons.\n * Microfencing also causes the app to use significantly more battery.\n * By default disabled.\n * <p>\n * WORK IN PROGRESS STILL IN BETA\n */\n void setMicrofencingEnabled(boolean enabled);\n\n /**\n * Logs out the currently logged in user.\n * To login an user use startPulsateSessionForAlias(String alias).\n */\n void logoutCurrentAlias(IPulsateRequestListener requestListener);\n\n /**\n * Enables or Disables In-App Notifications. Default - Enabled\n */\n void setInAppNotificationEnabled(boolean enabled);\n\n /**\n * Shows the last in app notification. In App Notification need to be enabled.\n * To enable in app notifications use enableInAppNotification(BOOL).\n */\n void showLastInAppNotification();\n\n /**\n * Disables or Enables push notifications from Pulsate.\n *\n * @param enabled\n */\n void setPushNotificationEnabled(boolean enabled);\n\n /**\n * Queries the server to check if push notifications are enabled for the given alias\n */\n boolean isPushNotificationEnabled();\n\n /**\n * Sets the user to either be authorized or unauthorized to view the inbox.\n */\n void setUserAuthorized(boolean authorized);\n\n /**\n * Sets a listener that receives callback when an unauthorized action happens.\n */\n void setUserUnauthorizedListener(IPulsateUserUnauthorizedListener listener);\n\n /**\n * Shows the last blocked inbox action - single card view, inbox entry, thread entry\n */\n void showLastUnauthorizedMessage();\n\n /**\n * Enables or Disables the New Thread Button in the Pulsate Inbox\n */\n void setNewThreadButtonEnabled(boolean enabled);\n\n /**\n * Sets the Authorization Data for the app. Authorization Data is later used in API Requests.\n *\n * @param authorizationData\n */\n void setAuthorizationData(AuthorizationData authorizationData);\n\n /**\n * Enables or Disables sending the user location when a beacon event happens.\n * By default this it disabled\n *\n * @param enabled\n */\n void sendLocationWithBeaconEvents(boolean enabled);\n\n /**\n * Updates the user's first name. Gets updated when entering background.\n *\n * @param firstName firstName\n */\n void updateFirstName(String firstName);\n\n /**\n * Updates the user's last name. Gets updated when entering background.\n *\n * @param lastName lastName\n */\n void updateLastName(String lastName);\n\n /**\n * Updates the user's email. Gets updated when entering background.\n *\n * @param email email\n */\n void updateEmail(String email);\n\n /**\n * Updates user's gender. Gets updated when entering background.\n * Values:\n * Gender.FEMALE\n * Gender.MALE\n *\n * @param gender user's gender\n */\n void updateGender(int gender);\n\n /**\n * Updates user's age. Gets updated when entering background.\n *\n * @param age user's age\n */\n void updateAge(String age);\n\n /**\n * Updates user's privacy. Gets updated in realtime.\n * Values:\n * Privacy.UNSUBSCRIBE\n * Privacy.SUBSCRIBE\n *\n * @param privacy user's privacy\n */\n void setPrivacy(int privacy);\n\n /**\n * Creates a custom attribute with a string. Key can be nil. Gets updated when entering background.\n *\n * @param attributeName custom attribute name\n * @param attributeValueString attribute value\n */\n void createAttribute(String attributeName, String attributeValueString);\n\n /**\n * Creates a custom attribute with an integer. Key can't be nil. Gets updated when entering background.\n *\n * @param attributeName custom attribute name\n * @param attributeValueInt attribute value\n */\n void createAttribute(String attributeName, int attributeValueInt);\n\n /**\n * Creates a custom attribute with a float. Key can't be nil. Gets updated when entering background.\n *\n * @param attributeName custom attribute name\n * @param attributeValueFloat attribute value\n */\n void createAttribute(String attributeName, float attributeValueFloat);\n\n /**\n * Creates custom attribute with a bool. Key can't be nil. Gets updated when entering background.\n *\n * @param attributeName custom attribute name\n * @param attributeValueBool attribute value\n */\n void createAttribute(String attributeName, boolean attributeValueBool);\n\n /**\n * Creates custom attribute with a date. Key can't be nil. Gets updated when entering background.\n *\n * @param attributeName custom attribute name\n * @param attributeValueDate attribute value\n */\n void createAttribute(String attributeName, Date attributeValueDate);\n\n /**\n * Sends a custom in app event\n *\n * @param event event to be sent - can't be nil\n */\n void createEvent(String event);\n\n /**\n * Sends a list of custom in app events\n *\n * @param events events to be sent - can't be nil\n */\n void createEvents(List<String> events);\n\n /**\n * Increments given integer attribute by given value. Gets updated when entering background.\n *\n * @param counterName which attribute to increment\n * @param value value to increment by\n */\n void incrementCounter(String counterName, int value);\n\n /**\n * Decrements given integer attribute by given. Gets updated when entering background.\n *\n * @param counterName custom attribute name\n * @param value attribute value\n */\n void decrementCounter(String counterName, int value);\n\n /**\n * Attributes synchronize when the app is entering background. This method forces the synchronization to happen instantly.\n */\n void forceAttributeSync();\n\n /**\n * Opens the Pulsate Inbox\n */\n void showFeed();\n\n /**\n * Returns the last known location of the user\n */\n Location getLastKnownLocation();\n\n /**\n * Sets a listener that receives enter/exit/dwell geofence callbacks from Pulsate.\n *\n * @param listener listener that will receive callbacks from Pulsate\n */\n void setGeofenceListener(IPulsateGeofenceListener listener);\n\n /**\n * Sets a listener that receives beacon range callbacks from Pulsate.\n *\n * @param listener listener that will receive callbacks from Pulsate\n */\n void setBeaconRangeNotifier(IPulsateBeaconRangeNotifierListener listener);\n\n /**\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 */\n void setUnreadCountUpdateListener(IPulsateUnreadCountUpdateListener listener);\n}", "language": "java" } ] } [/block]