{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"PulsateManager Methods","type":"basic","slug":"pulsatemanager-methods-1","excerpt":"","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 * Sets the Authorization Data for the app. Authorization Data is later used in API Requests.\\n *\\n * :::at:::param authorizationData\\n */\\n void setAuthorizationData(AuthorizationData authorizationData);\\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 * 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 * Use to send the FCM Payload to Pulsate.\\n * Pulsate will check the Payload and handle it if it is a Pulsate Payload.\\n * @param remoteMessage\\n * @return true if Pulsate was able to handle the Push Payload\\n */\\n boolean onMessageReceived(RemoteMessage remoteMessage);\\n\\n /**\\n * Use to send the FCM New Token to Pulsate.\\n * @param token\\n */\\n void onNewToken(@NotNull String token);\\n\\n /**\\n * Enables or Disables Geofencing and Beacon Scanning.\\n * By default enabled.\\n */\\n void setLocationUpdatesEnabled(boolean enabled);\\n\\n void isLocationUpdatesEnabled(IPulsateValueListener<Boolean> listener);\\n\\n /**\\n * Enables or Disables In-App Notifications. Default - Enabled\\n */\\n void setInAppNotificationEnabled(boolean enabled);\\n\\n void isInAppNotificationEnabled(IPulsateValueListener<Boolean> listener);\\n\\n /**\\n * Sets the duration of small in app notifications. Default - 12s\\n */\\n void setSmallInAppNotificationDuration(int seconds);\\n\\n void getSmallInAppNotificationDuration(IPulsateValueListener<Integer> listener);\\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 void isPushNotificationEnabled(IPulsateValueListener<Boolean> listener);\\n\\n /**\\n * Sets the user to either be authorized or unauthorized to view the inbox.\\n */\\n void setUserAuthorized(boolean authorized);\\n\\n void isUserAuthorized(IPulsateValueListener<Boolean> listener);\\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 void isNewThreadButtonEnabled(IPulsateValueListener<Boolean> listener);\\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 void isLocationWithBeaconEvents(IPulsateValueListener<Boolean> listener);\\n\\n /**\\n * Updates the user's first name. Gets updated when entering background.\\n *\\n * @param firstName firstName - can't be nil\\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 - can't be nil\\n */\\n void updateLastName(String lastName);\\n\\n /**\\n * Updates the user's email. Gets updated when entering background.\\n *\\n * @param email email - can't be nil\\n */\\n void updateEmail(String email);\\n\\n /**\\n * Updates the user's phone number. Gets updated when entering background.\\n * Specify the phone number using the E.164 format. E.164 is a standard for the phone number structure used for international telecommunication.\\n * Phone numbers that follow this format can have a maximum of 15 digits, and they are prefixed with the plus character (+) and the country code.\\n * For example, a contact in the United States has a country code \\\"1\\\" , area code \\\"408\\\" and phone number \\\"XXX-XXXX\\\", you'd enter +1408XXXXXXX.\\n * @param phoneNumber phoneNumber - can't be nil\\n */\\n void updatePhoneNumber(String phoneNumber);\\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 - cant' be null\\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 - can't be null\\n */\\n void setPrivacy(int privacy);\\n\\n void getPrivacy(IPulsateValueListener<Integer> listener);\\n\\n /**\\n * Creates a custom attribute with a string. Neither 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 * Sends a revenue event\\n *\\n * @param event event to be sent - can't be nil\\n */\\n void createRevenueEvent(PulsateRevenueEvent event);\\n\\n /**\\n * Sends a list of revenue events\\n *\\n * @param events events to be sent - can't be nil\\n */\\n void createRevenueEvents(List<PulsateRevenueEvent> 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 Pulsate Inbox Items\\n */\\n void getFeed(int page, IPulsateValueListener<PulsateFeedState> listener);\\n\\n /**\\n * When using void getFeed(int page, IPulsateValueListener<PulsateFeedState> listener);\\n * We recommend using this method to pass user onClick events to Pulsate to properly handle it.\\n * Pulsate will make sure that the click does what it should do - open url, open deeplink, send custom events, record opens / clicks\\n */\\n void handleFeedClick(PulsateInboxItem pulsateInboxItem, int destination);\\n\\n /**\\n * Returns the last known location of the user\\n */\\n void getLastKnownLocation(IPulsateValueListener<Location> listener);\\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 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 /**\\n * Enables or Disables using the user initials as the user avatar.\\n * When disabled the avatar will always be an anon icon.\\n * By default enabled\\n *\\n * @param useInitials\\n */\\n void useInitialsForUserAvatar(boolean useInitials);\\n\\n void isUseInitialsEnabled(IPulsateValueListener<Boolean> listener);\\n\\n /**\\n * Developers can now add an additional button in the Pulsate Feed. The button will appear in the main Feed Toolbar in the right corner.\\n * To add this button you need to add a new drawable called \\\"ic_pulsate_inbox_toolbar_right_button\\\"and call the new *setOnInboxRightButtonClickListener* method and pass an *OnClickListener*.\\n * This should be done in the Application class under *onCreate()*.\\n *\\n * @param listener\\n */\\n void setOnInboxRightButtonClickListener(View.OnClickListener listener);\\n}\\n\",\n \"language\": \"java\"\n }\n ]\n}\n[/block]","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5f2ab3adf25d380432a02e16","createdAt":"2020-08-05T13:27:09.218Z","user":"57bc3654b9c7f0220009c77b","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"SDK Advanced","slug":"sdk-advanced","order":3,"from_sync":false,"reference":false,"_id":"5f2ab1f9c1644603559149ac","createdAt":"2020-08-05T13:19:53.807Z","version":"5e5019b49e8f240011cc6ade","project":"54aa7f773b56130b0056c86e","__v":0},"version":{"version":"2.8","version_clean":"2.8.0","codename":"Android SDK","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e5019b49e8f240011cc6a47","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","5e5019b49e8f240011cc6a48","5e5019b49e8f240011cc6a49","5e5019b49e8f240011cc6a4a","5e5019b49e8f240011cc6a4b","5e5019b49e8f240011cc6a4c","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","5e5019b49e8f240011cc6a4d","5e5019b49e8f240011cc6a4e","5c73dd27e8fdc000572a206a","5e5019b49e8f240011cc6a4f","5e501b7e7c8bdc00450ea66a","5e53daa9884b750025b5cad4","5f2ab0dfbf70f7063ad0c4f3","5f2ab1e9448d87068b348f9c","5f2ab1f9c1644603559149ac","5f2ab205bc35e507e8cead35"],"_id":"5e5019b49e8f240011cc6ade","project":"54aa7f773b56130b0056c86e","forked_from":"5e4fbbbda8fb41028f1861fe","__v":6,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z"},"project":"54aa7f773b56130b0056c86e","__v":0,"parentDoc":null}