Package com.netmera
Class Netmera
java.lang.Object
com.netmera.Netmera
Netmera is the main class to be used for configuring the SDK and interacting with Netmera
servers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanThis method is used to query the Push Notification permissions that come with Android API Level 33.static NotificationPermissionStatuscheckNotificationPermission(android.app.Activity activity) Checks and returns the user's notification permission status.static voidDisable Netmera to present received popups.static voidDisable push notification for this device.static voidEnable Netmera to present received popups immediately.static booleanEnable push notification for this device if system notifications are enabled.static voidenablePush(android.app.Activity activity) Enable push notification for this device if system notifications are enabled.static voidfetchCategory(NetmeraCategoryFilter filter, NetmeraInboxCategory.NetmeraInboxCategoryCallback callback) Fetch the categories of push notifications matching with given filter from Netmera.static voidfetchCoupons(int page, int max, NMFetchCouponsResultListener listener) Returns the coupons according to the parameters given with theNMFetchCouponsResultListener.static voidfetchInbox(NetmeraInboxFilter filter, NetmeraInbox.NetmeraInboxFetchCallback callback) Fetch list of push notifications matching with given filter from Netmera.static voidfetchPushToken(NMPushTokenResultListener listener) static StringReturns the user's external Id if it has already been set.static voidgetEmailPermission(NMPermissionResultListener listener) Returns the email permission for the userstatic voidgetInboxCountForStatus(NMInboxStatusCountFilter filter, NMInboxCountResultListener listener) Returns the number of inbox messages according to the parameters given with theNMInboxStatusCountFilter.static voidgetSmsPermission(NMPermissionResultListener listener) Returns the SMS permission for the userstatic voidFetch the category preference list of a single user.static voidgetWhatsAppPermission(NMPermissionResultListener listener) Returns the WhatsApp permission for the userstatic voidhandleInteractiveAction(android.content.Context context, NetmeraInteractiveAction interactiveAction) Perform push object's interactive actionsstatic voidhandlePushObject(android.app.Activity activity, NetmeraPushObject netmeraPushObject) Perform push object's action or show a simple dialog with action buttons according to push typestatic voidhandleWebContent(android.webkit.WebView webView) Load contents of the web view action of recent push notification in given web view.static voidhandleWebContent(android.webkit.WebView webView, NetmeraWebViewCallback netmeraWebViewCallback) Load contents of the web view action of recent push notification in given web view and delegatesWebViewClient.shouldOverrideUrlLoading(WebView, String)} method calls to given callback.static voididentifyUser(NMUser nmUser) Set or update the identifiers of the user in Netmera.static voididentifyUser(NMUser nmUser, NMUpdateUserListener listener) Set or update the identifiers of the user in Netmera.static voidinit(NetmeraConfiguration netmeraConfiguration) Initialize the Netmera instance.static voidinit(NetmeraConfiguration netmeraConfiguration, NMInitSessionListener listener) static voidDeprecated.This method should not be used, as the crash tracker functionality has been removed from the SDK.static voidinitWithHoldingOperation(NetmeraConfiguration netmeraConfiguration, NMInitSessionListener listener) This method is for advanced usage; if you think it's required for you, you can contact support@netmera.comstatic booleanisNetmeraRemoteMessage(Object remoteMessage) Deprecated.UseisNetmeraRemoteMessage(Map)for more straightforward way to check the incoming RemoteMessage.static booleanisNetmeraRemoteMessage(Map<String, String> dataOfRemoteMessage) This method should be called for obtaining, if the incoming RemoteMessage is sent from the Netmera Console.static booleanCheck push notification state.static voidkill()Kills Netmera completely as if it never exists.static voidDeprecated.This method should not be used, as the crash tracker functionality has been removed from the SDK.static voidonNetmeraNewToken(String token) This method must be called when the application has its own integration of FirebaseMessagingService.static voidonNetmeraNewToken(String token, boolean forceToSend) This method must be called when the application has its own integration of FirebaseMessagingService.static voidonNetmeraPushMessageReceived(Object remoteMessage) This method must be called when the application has its own integration of either FirebaseMessagingService or HmsMessageService.static voidregisterForNetmeraDeeplinkCallback(NMDeeplinkCallback nmDeeplinkCallback) static voidregisterForNetmeraInAppmessageActions(NMInAppMessageActionCallbacks nmInAppMessageActionCallbacks) static voidregisterForNetmeraWebWidgetCallbacks(NMWebWidgetCallbacks nmWebWidgetCallbacks) static voidregisterForPushActions(NMPushActionCallbacks nmPushActionCallbacks) static voidregisterProviderComponent(NMProviderComponent nmProviderComponent, NMProviderRegistrationCallback registrationCallback) static voidrequestNotificationPermissions(android.app.Activity activity) This method allows you to get the Push Notification Permissions that come with Android API Level 33 at runtime.static voidRequest location permissions from user (For Android version level 23 and above).static voidSend an event to Netmera servers.static <T extends NetmeraEvent>
voidsendEvent(T netmeraEvent) Send an event to Netmera servers.static voidsendScreenErrorEvent(String errorTitle, String errorMessage) static voidSet given Netmera SDK API key.static voidsetBaseUrl(String url) Changes base API URL to given URL string.static voidsetBaseUrlWithApiKey(String baseUrl, String apiKey) Sets given Netmera SDK API key and changes base API URL to given URL string.static voidsetEmailPermission(boolean isAllowed) Sets the email permission for the userstatic voidsetNetmeraEncrypter(NetmeraEncrypter netmeraEncrypter) static voidsetNetmeraHeaders(android.content.ContentValues headerValueSet) This method should be called to add custom headers to Netmera Requests for hybrid platforms.static voidsetNetmeraMaxActiveRegions(int netmeraMaxActiveRegions) Request maximum active geofence region from userstatic voidsetSmsPermission(boolean isAllowed) Sets the SMS permission for the userstatic voidsetUserCategoryPreference(int categoryId, Boolean categoryEnabled, NMCategoryPreferenceSetCallback listener) Update enable status of user's category preference according to the given category id.static voidsetWhatsAppPermission(boolean isAllowed) Sets the WhatsApp permission for the userstatic voidstatic voidEnables event sharing and update user if it has been blocked before.static voidTells Netmera to start working if the SDK is initialized withinitWithHoldingOperation(NetmeraConfiguration, NMInitSessionListener)methodstatic voidBlocks event sharing and updating user.static voidtrackComposeAction(String viewIdentifier) Track a Compose action with the given view identifier.static voidtrackComposeView(String viewIdentifier) Track a Compose view with the given view identifier.static voidturnOffSendingEventAndUserUpdate(boolean turnOff) Completely turn off sending all events and user data.static voidupdateAll(int inboxStatus, NetmeraInbox.NetmeraInboxStatusCallback callback) Update status of all push objects in the inbox.static voidupdateStatusByCategories(int inboxStatus, List<String> categoryList, NetmeraInbox.NetmeraInboxStatusCallback callback) Update status of the push objects which are in the given categories.static <T extends NetmeraUser>
voidupdateUser(T netmeraUser) Deprecated.UseidentifyUser(NMUser)for user identification andupdateUserProfile(NMUserProfile)for updating profile attributes.static <T extends NetmeraUser>
voidupdateUser(T netmeraUser, NMUpdateUserListener listener) Deprecated.UseidentifyUser(NMUser)for user identification andupdateUserProfile(NMUserProfile)for updating profile attributes.static <T extends NMUserProfile>
voidupdateUserProfile(T userProfile) Set or update the attributes of the user in Netmera.static <T extends NMUserProfile>
voidupdateUserProfile(T userProfile, NMUpdateUserProfileListener listener) Set or update the attributes of the user in Netmera with a listener for the operation result.
-
Constructor Details
-
Netmera
public Netmera()
-
-
Method Details
-
init
public static void init(@NonNull NetmeraConfiguration netmeraConfiguration) Initialize the Netmera instance. Netmera does not start operating, it even does not exist, unless this method is called. Any Netmera method called before this method is simply ignored. In order for Netmera to operate correctly, this method must definitely be called in theApplication.onCreate()method.- Parameters:
netmeraConfiguration-NetmeraConfigurationencapsulates all the necessary information for initialization of Netmera instance.
-
init
public static void init(@NonNull NetmeraConfiguration netmeraConfiguration, @Nullable NMInitSessionListener listener) -
initWithHoldingOperation
public static void initWithHoldingOperation(@NonNull NetmeraConfiguration netmeraConfiguration, @Nullable NMInitSessionListener listener) This method is for advanced usage; if you think it's required for you, you can contact support@netmera.com Initialize the Netmera instance with holding operations tillstartOperation()is called. If SDK is initialized with this method and laterstartOperation()is not called, Netmera will not do anything. Any Netmera method called before this method is simply ignored. In order for Netmera to operate correctly, this method must definitely be called in theApplication.onCreate()method.- Parameters:
netmeraConfiguration-NetmeraConfigurationencapsulates all the necessary information for initialization of Netmera instance.
-
startOperation
public static void startOperation()Tells Netmera to start working if the SDK is initialized withinitWithHoldingOperation(NetmeraConfiguration, NMInitSessionListener)method If SDK is not operating, any Netmera method called before this method is simply ignored. If Netmera is already operating, this method does nothing. -
kill
public static void kill()Kills Netmera completely as if it never exists. If you want Netmera to work again, the SDK should be re-initialized in app launch. -
setBaseUrl
Changes base API URL to given URL string. The only use case for this method is when a custom Netmera domain is defined to your application.- Parameters:
url- Custom domain string.
-
skipAppConfigAndSetBaseUrl
-
setApiKey
Set given Netmera SDK API key. Calling this method with a valid API key will effectively start communication with Netmera servers. Netmera will store any operation until it has an API key Setting API key to null or empty string will stop all network operations, and all pending operations will be stored until a valid API key is set again.- Parameters:
apiKey- Application specific API key gathered from Netmera panel.
-
setBaseUrlWithApiKey
Sets given Netmera SDK API key and changes base API URL to given URL string. Calling this method with a valid API key will effectively start communication with Netmera servers. Netmera will store any operation until it has an API key Setting API key to null or empty string will stop all network operations, and all pending operations will be stored until a valid API key is set again.Please refer to use this method when a custom Netmera domain is defined to your application.
- Parameters:
apiKey- Application specific API key gathered from Netmera panel.
-
turnOffSendingEventAndUserUpdate
public static void turnOffSendingEventAndUserUpdate(boolean turnOff) Completely turn off sending all events and user data. If a true boolean parameter is passed to this method,NetmeraUserupdates andNetmeraEvents will never be sent to server.- Parameters:
turnOff- Flag for opt-out user data and events. Default value is false.
-
startDataTransfer
public static void startDataTransfer()Enables event sharing and update user if it has been blocked before. -
stopDataTransfer
public static void stopDataTransfer()Blocks event sharing and updating user. After this method call startDataTransfer must be called for reactivating. -
sendEvent
public static <T extends NetmeraEvent> void sendEvent(@NonNull T netmeraEvent) Send an event to Netmera servers. You can send behavioral actions of your users using this method. Rather than accepting unstructured information inside events, SDK requires given event to be a valid subclass ofNetmeraEventclass. This approach provides Netmera to verify type of the given event attributes, which is crucial during event analytics operations on Netmera servers.- Parameters:
netmeraEvent- An event object which is subclass ofNetmeraEvent
-
sendEvent
Send an event to Netmera servers. You can send behavioral actions of your users using this method. This method accepts an event code and a map of attributes, which will be wrapped in aNetmeraEventGenericobject internally. This provides a flexible way to send events without requiring a specificNetmeraEventsubclass. However, attributes still need to match the schema defined on the server. For all public event classes, you can use theEVENT_CODEconstant instead of hardcoding the event code string. For example, useNetmeraEventLogin.EVENT_CODEinstead of"n:cl".- Parameters:
code- The event code identifying the type of eventattributes- A map of event attributes (key-value pairs) to be sent with the event
-
trackComposeView
Track a Compose view with the given view identifier. This method is for autotracking only. It tracks when a Compose view is displayed. The givenviewIdentifierwill be prepended with the current page name (activity name and fragment name if available) in the format:"currentPageName|viewIdentifier". The current page name is automatically determined by the SDK based on the current activity and fragment context.- Parameters:
viewIdentifier- The unique identifier for the Compose view
-
trackComposeAction
Track a Compose action with the given view identifier. This method is for autotracking only. It tracks when a user interacts with a Compose component (e.g., button click). The givenviewIdentifierwill be prepended with the current page name (activity name and fragment name if available) in the format:"currentPageName|viewIdentifier". The current page name is automatically determined by the SDK based on the current activity and fragment context.- Parameters:
viewIdentifier- The unique identifier for the Compose action
-
identifyUser
public static void identifyUser(@NonNull NMUser nmUser) Set or update the identifiers of the user in Netmera. In order to update attributes of the user, you should useupdateUserProfile(NMUserProfile)- Parameters:
nmUser-NMUserobject for setting user related identifiers
-
identifyUser
Set or update the identifiers of the user in Netmera. In order to update attributes of the user, you should useupdateUserProfile(NMUserProfile)- Parameters:
nmUser-NMUserobject for setting user related identifierslistener-NMUpdateUserListenerto receive success or failure callbacks
-
updateUser
Deprecated.UseidentifyUser(NMUser)for user identification andupdateUserProfile(NMUserProfile)for updating profile attributes.Set or update the attributes of the user in Netmera.- Parameters:
netmeraUser-NetmeraUserobject for setting user related attributes
-
updateUser
@Deprecated public static <T extends NetmeraUser> void updateUser(T netmeraUser, NMUpdateUserListener listener) Deprecated.UseidentifyUser(NMUser)for user identification andupdateUserProfile(NMUserProfile)for updating profile attributes.Set or update the attributes of the user in Netmera.- Parameters:
netmeraUser-NetmeraUserobject for setting user related attributeslistener-NMUpdateUserListenerto receive success or failure callbacks
-
updateUserProfile
public static <T extends NMUserProfile> void updateUserProfile(T userProfile) Set or update the attributes of the user in Netmera.- Parameters:
userProfile-NMUserProfileobject for setting user related attributes
-
updateUserProfile
public static <T extends NMUserProfile> void updateUserProfile(T userProfile, NMUpdateUserProfileListener listener) Set or update the attributes of the user in Netmera with a listener for the operation result.- Parameters:
userProfile-NMUserProfileobject containing user-related attributes to be updatedlistener-NMUpdateUserProfileListenerto receive success or failure callbacks
-
enablePush
public static boolean enablePush()Enable push notification for this device if system notifications are enabled. Push notification is enabled by default but if push notification is disabled viadisablePush(), it can be re-enabled via this method. -
enablePush
public static void enablePush(android.app.Activity activity) Enable push notification for this device if system notifications are enabled. Push notification is enabled by default but if push notification is disabled viadisablePush(), it can be re-enabled via this method.- Parameters:
activity-Activityrequest permission if system notifications are disabled below API 33 goes to app settings
-
disablePush
public static void disablePush()Disable push notification for this device. This method can be used to prevent Netmera servers to send push notifications to this device. -
isPushEnabled
public static boolean isPushEnabled()Check push notification state. This method checks both system level state and app level state.- Returns:
- True if both of the states are @code{true}, false otherwise.
-
enablePopupPresentation
public static void enablePopupPresentation()Enable Netmera to present received popups immediately. By default, Netmera does not present received popup style notifications automatically. Use this method to enable Netmera to automatically present popup style notifications if you previously disabled usingdisablePopupPresentation()method. If a popup style notification has been received during the time at which popup presentation was disabled, it will be shown immediately after you call this method. If multiple popup notifications have been received, only the most recent one will be presented. -
disablePopupPresentation
public static void disablePopupPresentation()Disable Netmera to present received popups. By default, Netmera presents received popup style notifications automatically. Use this method to disable Netmera to automatically present popup style notifications. If any popup notification is received during the time at which presentation is disabled, it will be presented immediately after presentation is enabled again viaenablePopupPresentation(). -
handleWebContent
public static void handleWebContent(@NonNull android.webkit.WebView webView) Load contents of the web view action of recent push notification in given web view. When this method is called, Netmera will immediately load the contents of the web view action inside givenWebViewobject. If you need to be notified aboutWebViewClient.shouldOverrideUrlLoading(WebView, String)} method calls, you should usehandleWebContent(WebView, NetmeraWebViewCallback)method.- Parameters:
webView- A WebView instance upon which related HTML content will be loaded.
-
handleWebContent
public static void handleWebContent(@NonNull android.webkit.WebView webView, NetmeraWebViewCallback netmeraWebViewCallback) Load contents of the web view action of recent push notification in given web view and delegatesWebViewClient.shouldOverrideUrlLoading(WebView, String)} method calls to given callback. When this method is called, Netmera will immediately load the contents of the web view action inside givenWebViewobject.- Parameters:
webView- A WebView instance upon which related HTML content will be loaded.netmeraWebViewCallback- A callback instance which will be called for url loadings
-
handlePushObject
public static void handlePushObject(@NonNull android.app.Activity activity, @NonNull NetmeraPushObject netmeraPushObject) Perform push object's action or show a simple dialog with action buttons according to push type When this method is called, if push object has action buttons, a simple dialog with buttons will be shown. If one of button is clicked by user, its action will be taken. If push object has no action buttons, the action related to object itself will be taken directly.- Parameters:
activity- The activity in which dialog will be shown.netmeraPushObject- Push object instance to process
-
fetchInbox
public static void fetchInbox(@NonNull NetmeraInboxFilter filter, @NonNull NetmeraInbox.NetmeraInboxFetchCallback callback) Fetch list of push notifications matching with given filter from Netmera. This method will start the fetch process and return immediately. When fetch process is finished, given callback will be called with aNetmeraInboxobject or with a non-nullNetmeraErrorobject if fetch operation has failed. Use returned NetmeraInbox object for future operations on the inbox such as accessing the objects, fetching next pages of the inbox list, and modifying the status of objects.- Parameters:
filter- ANetmeraInboxFilterobject defining the filter options for the list of push objects to be returned from server.callback- ANetmeraInbox.NetmeraInboxFetchCallbackto be triggered after fetch process is completed.- See Also:
-
fetchCategory
public static void fetchCategory(@NonNull NetmeraCategoryFilter filter, @NonNull NetmeraInboxCategory.NetmeraInboxCategoryCallback callback) Fetch the categories of push notifications matching with given filter from Netmera. This method will start the fetch process and return immediately. When fetch process is finished, given callback will be called with aNetmeraCategoryobject or with a non-nullNetmeraErrorobject if fetch operation has failed. Use returned NetmeraInboxCategory object for future operations on the category such as accessing the objects or fetching next pages of the category list.- Parameters:
filter- ANetmeraCategoryFilterobject defining the filter options for the list of categories to be returned from server.callback- ANetmeraInboxCategory.NetmeraInboxCategoryCallbackto be triggered after fetch process is completed.- See Also:
-
requestPermissionsForLocation
public static void requestPermissionsForLocation()Request location permissions from user (For Android version level 23 and above). Calling this method will trigger OS to present location permission dialog to user. After permissions are granted, location tracking and geofence monitoring will start if they have been configured on Netmera panel. You do not need to call this method if your app already has Location permission. -
requestNotificationPermissions
public static void requestNotificationPermissions(android.app.Activity activity) This method allows you to get the Push Notification Permissions that come with Android API Level 33 at runtime.- Parameters:
activity- Necessary for context
-
checkNotificationPermission
public static NotificationPermissionStatus checkNotificationPermission(android.app.Activity activity) Checks and returns the user's notification permission status.- Parameters:
activity- Necessary for context- Returns:
NotificationPermissionStatusenum representing the current permission status.
-
areNotificationsEnabled
public static boolean areNotificationsEnabled()This method is used to query the Push Notification permissions that come with Android API Level 33.- Returns:
- Always returns true if the application has Build.VERSION.SDK_INT < 33 or if the user grants the necessary permissions. Otherwise false
-
setNetmeraMaxActiveRegions
public static void setNetmeraMaxActiveRegions(int netmeraMaxActiveRegions) Request maximum active geofence region from user If user sets max active regions' number greater than 100 or smaller than 0, it will be set as the default which is 100- Parameters:
netmeraMaxActiveRegions- Maximum Netmera active geofence regions
-
onNetmeraPushMessageReceived
This method must be called when the application has its own integration of either FirebaseMessagingService or HmsMessageService. Please consider calling this when application's onMessageReceived(Object remoteMessage) method was triggered by either Firebase Console or Huawei Console.- Parameters:
remoteMessage- com.google.firebase.messaging.RemoteMessage or com.huawei.hms.push.RemoteMessage Push notification message, which was caught by either FirebaseMessagingService or HmsMessageService
-
onNetmeraNewToken
This method must be called when the application has its own integration of FirebaseMessagingService. Please consider calling this when application's onNewToken(String s) method was triggered by Firebase or HMS.- Parameters:
token- Token, which was caught by depending on provider.
-
onNetmeraNewToken
This method must be called when the application has its own integration of FirebaseMessagingService. Please consider calling this when application's onNewToken(String s) method was triggered by Firebase or HMS.- Parameters:
token- Token, which was caught by depending on provider.forceToSend- Force to send new token to the server.
-
fetchPushToken
-
isNetmeraRemoteMessage
Deprecated.UseisNetmeraRemoteMessage(Map)for more straightforward way to check the incoming RemoteMessage.- Parameters:
remoteMessage- Push notification message, which was sent by FCM or HMS
-
isNetmeraRemoteMessage
This method should be called for obtaining, if the incoming RemoteMessage is sent from the Netmera Console. True - If RemoteMessage belongs Netmera Console False - For other sources- Parameters:
dataOfRemoteMessage- Push notification message, which was sent by FCM or HMS, If called from FCM service pass remoteMessage.data, If called from HMS service pass remoteMessage.dataOfMap.
-
setNetmeraHeaders
public static void setNetmeraHeaders(android.content.ContentValues headerValueSet) This method should be called to add custom headers to Netmera Requests for hybrid platforms. Usage of this method is not obligatory.- Parameters:
headerValueSet- - Header Map, which holds key-value pairs
-
updateAll
Update status of all push objects in the inbox. Calling this method will update the inbox status of all push objects, and result will be informed via givenNetmeraInbox.NetmeraInboxStatusCallbackobject. Anullerrorvalue means operation succeeded. Setting multiple status options to status parameter will result in an immediate error.- Parameters:
inboxStatus- Status option to be set upon given push objects.callback- ANetmeraInbox.NetmeraInboxStatusCallbackto be triggered after update process is completed.
-
updateStatusByCategories
public static void updateStatusByCategories(int inboxStatus, @NonNull List<String> categoryList, NetmeraInbox.NetmeraInboxStatusCallback callback) Update status of the push objects which are in the given categories. Calling this method will update the inbox status of push objects which are in the given categories, and result will be informed via givenNetmeraInbox.NetmeraInboxStatusCallbackobject. Anullerrorvalue means operation succeeded. Setting multiple status options to status parameter will result in an immediate error.- Parameters:
inboxStatus- Status option to be set upon to all push objects which are in the given categories.categoryList- The list of categories whose push objects will be updated.callback- ANetmeraInbox.NetmeraInboxStatusCallbackto be triggered after update process is completed.
-
handleInteractiveAction
public static void handleInteractiveAction(@NonNull android.content.Context context, @NonNull NetmeraInteractiveAction interactiveAction) Perform push object's interactive actions When this method is called, action according to push object's interactive action will be triggered/shown. (For example triggering of a deeplink or showing webpage upon button click.)- Parameters:
context- Activity context will be accepted.interactiveAction- Push object'sNetmeraInteractiveAction.
-
getCurrentExternalId
Returns the user's external Id if it has already been set.- Returns:
- String external id of the user
-
setUserCategoryPreference
public static void setUserCategoryPreference(int categoryId, Boolean categoryEnabled, NMCategoryPreferenceSetCallback listener) Update enable status of user's category preference according to the given category id.- Parameters:
categoryId- Category preference id, which will be updated.categoryEnabled- Status of the category preference. True stands for enable.listener-NMCategoryPreferenceSetCallbackNeeded for listening network results.
-
getInboxCountForStatus
public static void getInboxCountForStatus(NMInboxStatusCountFilter filter, @NonNull NMInboxCountResultListener listener) Returns the number of inbox messages according to the parameters given with theNMInboxStatusCountFilter.- Parameters:
filter-NMInboxStatusCountFilterlistener-NMInboxCountResultListenerNeeded for listening network results.
-
fetchCoupons
public static void fetchCoupons(int page, int max, @NonNull NMFetchCouponsResultListener listener) Returns the coupons according to the parameters given with theNMFetchCouponsResultListener.- Parameters:
page- the page number [0...Max_Int]max- maximum count [1...Max_Int]
-
getUserCategoryPreferenceList
public static void getUserCategoryPreferenceList(@NonNull NMCategoryPreferenceFetchCallback listener) Fetch the category preference list of a single user.- Parameters:
listener-NMCategoryPreferenceFetchCallbackNeeded for listening network results.NMCategoryPreferencelist will be returned onSuccess method callback.
-
initCrashTracker
Deprecated.This method should not be used, as the crash tracker functionality has been removed from the SDK. -
logException
Deprecated.This method should not be used, as the crash tracker functionality has been removed from the SDK. -
setNetmeraEncrypter
public static void setNetmeraEncrypter(NetmeraEncrypter netmeraEncrypter) -
registerForPushActions
-
registerForNetmeraInAppmessageActions
public static void registerForNetmeraInAppmessageActions(NMInAppMessageActionCallbacks nmInAppMessageActionCallbacks) -
registerForNetmeraWebWidgetCallbacks
-
registerForNetmeraDeeplinkCallback
public static void registerForNetmeraDeeplinkCallback(NMDeeplinkCallback nmDeeplinkCallback) -
sendScreenErrorEvent
-
registerProviderComponent
public static void registerProviderComponent(NMProviderComponent nmProviderComponent, NMProviderRegistrationCallback registrationCallback) -
setEmailPermission
public static void setEmailPermission(boolean isAllowed) Sets the email permission for the user- Parameters:
isAllowed- permission to be set
-
getEmailPermission
public static void getEmailPermission(@NonNull NMPermissionResultListener listener) Returns the email permission for the user- Parameters:
listener-NMPermissionResultListenerto receive success or failure callbacks
-
setSmsPermission
public static void setSmsPermission(boolean isAllowed) Sets the SMS permission for the user- Parameters:
isAllowed- permission to be set
-
getSmsPermission
public static void getSmsPermission(@NonNull NMPermissionResultListener listener) Returns the SMS permission for the user- Parameters:
listener-NMPermissionResultListenerto receive success or failure callbacks
-
setWhatsAppPermission
public static void setWhatsAppPermission(boolean isAllowed) Sets the WhatsApp permission for the user- Parameters:
isAllowed- permission to be set
-
getWhatsAppPermission
public static void getWhatsAppPermission(@NonNull NMPermissionResultListener listener) Returns the WhatsApp permission for the user- Parameters:
listener-NMPermissionResultListenerto receive success or failure callbacks
-