### Example GET Request for Documentation Query Source: https://user.netmera.com/netmera-developer-guide/platforms/flutter/changelog To get additional information not directly on the page, make a GET request to the page URL with an 'ask' query parameter containing your question. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/flutter/changelog.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/platforms/web/user-and-attributes This example shows how to perform an HTTP GET request to query the documentation dynamically by appending an 'ask' query parameter with a natural language question. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/web/user-and-attributes.md?ask= ``` -------------------------------- ### Dynamic Documentation Query Example Source: https://user.netmera.com/netmera-developer-guide/platforms/react-native/push-inbox Perform an HTTP GET request to query documentation dynamically. Include a specific, self-contained question in natural language as the `ask` query parameter. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/react-native/push-inbox.md?ask= ``` -------------------------------- ### Install Dependencies Source: https://user.netmera.com/netmera-developer-guide/platforms/cordova/sdk-integration After updating `package.json`, run this command to install all project dependencies, including the newly added wrapper. ```typescript npm install ``` -------------------------------- ### Example Justification for Google Play Source: https://user.netmera.com/netmera-developer-guide/platforms/android/app-tracking Provide a clear justification for using the `QUERY_ALL_PACKAGES` permission when submitting your app to the Google Play Store. This example explains its use for analytics. ```text This app requests the QUERY_ALL_PACKAGES permission to enable analytics features, allowing us to track app performance and gain insights for user experience improvements. ``` -------------------------------- ### Start a Live Activity Locally Source: https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/live-activities This section explains how to start a Live Activity locally on an iOS device using Apple's ActivityKit framework and register it with the Netmera SDK for push-based updates. ```APIDOC ## Start a Live Activity Locally You can use Apple’s `ActivityKit` framework to create a Live Activity instance locally on the device. The Netmera SDK manages the push token generated by `ActivityKit`, enabling you to update Live Activities via the Netmera API. **Steps to Start a Live Activity Locally** 1. Create an instance of your Live Activity using Apple’s `ActivityKit` APIs. 2. Set the `pushType` parameter to `.token` to generate a push token. 3. Pass the previously defined `ActivityAttributes` and `ContentState` when creating the activity. 4. Register the Live Activity with Netmera by calling: (This registration step is required only for Live Activities started locally) ```swift Netmera.observeActivity(matchActivity) ``` **Example: `LiveActivityManager` Class** ```swift import NetmeraCore import NetmeraLiveActivity import ActivityKit class LiveActivityManager { func startMatchActivity() { let attributes = MatchScoreAttributes( netmeraGroupId: "ars-liv-2025", homeTeamName: "Arsenal", awayTeamName: "Liverpool", homeTeamLogo: "arsenal_logo", awayTeamLogo: "liverpool_logo" ) let contentState = MatchScoreAttributes.ContentState( homeTeamScore: 0, awayTeamScore: 0, matchStatus: "1st half" ) matchActivity = try Activity.request( attributes: attributes, contentState: contentState, pushType: .token // Important: Use `.token` to enable Netmera to manage push-based updates ) if let matchActivity { Netmera.observeActivity(matchActivity) } } } ``` ``` -------------------------------- ### Installing Pods via Terminal Source: https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/sdk-integration Execute this command in your terminal after updating your Podfile to install all specified dependencies, including the Netmera SDK modules. ```bash pod install ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/integrations/location To get information not directly on the page, make an HTTP GET request with the 'ask' query parameter. The question should be specific and self-contained. ```bash GET https://user.netmera.com/netmera-developer-guide/integrations/location.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/changelog To get more information not directly on the page, make an HTTP GET request to the page URL with an 'ask' query parameter containing your question. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/changelog.md?ask= ``` -------------------------------- ### Query Documentation with GET Request Source: https://user.netmera.com/netmera-developer-guide/integrations/marketing-platforms/adobe-audience-manager Perform an HTTP GET request to the current page URL with the 'ask' query parameter to ask a question about the documentation. The response will contain a direct answer and relevant excerpts. ```http GET https://user.netmera.com/netmera-developer-guide/integrations/marketing-platforms/adobe-audience-manager.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api/inbox-feature Send an HTTP GET request to the current page URL with the 'ask' query parameter to dynamically query the documentation. The question should be specific and self-contained. ```http GET https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api/inbox-feature.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://user.netmera.com/netmera-developer-guide/integrations/sms-providers/twilio Send an HTTP GET request to a documentation URL with the 'ask' query parameter to retrieve specific information. The question should be clear and self-contained. ```http GET https://user.netmera.com/netmera-developer-guide/integrations/sms-providers/twilio.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api Perform an HTTP GET request to the current page URL with the 'ask' query parameter to get dynamic answers and relevant excerpts from the documentation. Use this for clarifications or when information is not explicitly present. ```http GET https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/platforms/android/push-notifications/widget-and-in-app-messages To get additional information not explicitly present on the page, perform an HTTP GET request with the 'ask' query parameter. The response will include a direct answer and relevant documentation excerpts. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/android/push-notifications/widget-and-in-app-messages.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://user.netmera.com/netmera-developer-guide/integrations/sms-providers/iys-integration Perform an HTTP GET request to the current page URL with the 'ask' query parameter to ask a specific question about the documentation. The question should be self-contained and in natural language. ```http GET https://user.netmera.com/netmera-developer-guide/integrations/sms-providers/iys-integration.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/platforms/web/events To get information not explicitly present on the page, perform an HTTP GET request with the `ask` query parameter. The question should be specific and in natural language. The response includes a direct answer and relevant excerpts. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/web/events.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift Perform an HTTP GET request to query the documentation dynamically with a specific question. Use this to get direct answers, clarifications, or related documentation sections when information is not explicitly present. ```HTTP GET https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/integrations/sms-providers To get more information not present on the current page, perform an HTTP GET request to the page URL with the 'ask' query parameter. The question should be specific and in natural language. Use this for clarifications or to retrieve related documentation. ```HTTP GET https://user.netmera.com/netmera-developer-guide/integrations/sms-providers.md?ask= ``` -------------------------------- ### Get Push Notification Results Source: https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api/notifications Retrieves the results of a push notification, including success and failure details for each installation. Supports pagination. ```json { "nextPage": "https://restapi.netmera.com/rest/3.0/getPushResult?offset=hJbolUuHucJ9dd&max=10", "list": [ { "platform": "IOS", "status": "FAILED", "errorCode": "8", "installationId": "C2Ii2ztdEaok0", "errorMsg": "INVALID_TOKEN", "timeStamp": 1557819194426, "msgTitle": "Awesome Title", "msgText": "How is it going, Jon?" }, { "platform": "ANDROID", "status": "SUCCESS", "installationId": "U7IwgcM8phSmv", "extId": "B4A92950-B0FD-43E6-B312-C3EE088890BD", "timeStamp": 1557819194426, "msgTitle": "Awesome Title", "msgText": "How is it going, Jon?" } // ... Additional entries ] } ``` -------------------------------- ### Get Push Result Source: https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api/notifications Retrieves the results of push notifications sent to users. If start and end dates are not specified, the results for the last 2 weeks will be returned. ```APIDOC ## GET /getPushResult ### Description To retrieve users' push results (success or failure), use the following request. If start and end dates are not specified, the results for the last 2 weeks will be returned. ### Method GET ### Endpoint https://restapi.netmera.com/rest/3.0/getPushResult ### Parameters #### Query Parameters - **max** (integer) - Optional - Maximum number of results to return. - **notificationKey** (integer) - Optional - Notification ID on the panel. If specified, it filters results based on the given notification. - **extId** (string) - Optional - External ID for obtaining message results of a specific user. If provided, it narrows down the results to the specified user. - **start** (long) - Optional - Start date in milliseconds. If provided, it sets the beginning of the time range for retrieving results. - **end** (long) - Optional - End date in milliseconds. If provided, it marks the conclusion of the time range for retrieving results. - **token** (string) - Optional - Device token for acquiring message results of a specific device. If included, it restricts the results to the specified device. ### Request Example ```json curl -X GET \ -H "X-netmera-api-key: your_rest_api_key" \ -G \ --data-urlencode max=10 \ --data-urlencode notificationKey=106 \ --data-urlencode extId=B4A92950-B0FD-43E6-B312-C3EE088890BD \ --data-urlencode start=1557892331000 \ --data-urlencode end=1557892431000 \ --data-urlencode token=cKuWDH0ZOw4:APA91bEduwC4_FWB5i-isvsSbNO5Dglxg7Wstd8dOI8k8MgP-M2IryebG0PRctVzJ5vkkhDLh3QDEorv6-CfYvvO-rmCMjoUOI_unL3kvQOfi9op_JBzBzwNXGGzwfMLpVSAdYi6xNwn \ 'https://restapi.netmera.com/rest/3.0/getPushResult' ``` ### Response #### Success Response (200) - **messages** (array) - An array of notification result objects. - **status** (string) - The status of the notification (e.g., FINISHED, SENDING). - **stats** (array) - Statistics for the notification per platform. - **platform** (string) - The mobile platform (e.g., IOS, ANDROID). - **sent** (integer) - The number of messages sent. - **failed** (integer) - The number of messages that failed. - **clicked** (integer) - The number of messages that were clicked. - **startDate** (long) - The start date of the notification in milliseconds. - **endDate** (long) - The end date of the notification in milliseconds. - **notificationKey** (integer) - The unique identifier for the notification. #### Response Example ```json { "messages": [ { "status": "FINISHED", "stats": [ { "platform": "IOS", "sent": 6, "failed": 0, "clicked": 0 }, { "platform": "ANDROID", "sent": 0, "failed": 0, "clicked": 0 } ], "startDate": 1504790916883, "endDate": 1504790916917, "notificationKey": 749 }, { "status": "SENDING", "stats": [ { "platform": "IOS", "sent": 1, "failed": 0, "clicked": 1 }, { "platform": "ANDROID", "sent": 0, "failed": 0, "clicked": 0 } ], "startDate": 1504790402907, "endDate": 1504790402909, "notificationKey": 748 } ] } ``` ``` -------------------------------- ### Get Push Stats by Date Range Source: https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api/notifications Fetch notification statistics within a specified date range. Both 'start' and 'end' dates must be provided in milliseconds. ```bash curl -X GET \ -H "X-netmera-api-key: your_rest_api_key" \ -G \ --data-urlencode start=1501132423424 \ --data-urlencode end=150122342432 \ 'https://restapi.netmera.com/rest/3.0/getPushStats' ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/integrations/analytic-platforms Use this GET request to ask questions about the documentation. The response includes direct answers and relevant excerpts. ```http GET https://user.netmera.com/netmera-developer-guide/integrations/analytic-platforms.md?ask= ``` -------------------------------- ### Get Push Notification Results Source: https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api/notifications Retrieves the results of a previously sent push notification, including status, error details, and message information for each installation. Supports pagination. ```APIDOC ## GET /getPushResult ### Description Retrieves the results of a previously sent push notification, including status, error details, and message information for each installation. Supports pagination. ### Method GET ### Endpoint /rest/3.0/getPushResult ### Parameters #### Query Parameters - **notificationKey** (string) - Required - Notification key of a message to obtain users' responses. - **max** (integer) - Optional - The default value is 10. This parameter determines the maximum number of result info to fetch per page. ### Request Example ```json curl -X GET \ -H "X-netmera-api-key: your_rest_api_key" \ 'https://restapi.netmera.com/rest/3.0/getPushResult?offset=hJbolUuHucJ9dd&max=10' ``` ### Response #### Success Response (200) - **nextPage** (string) - URL for the next page of results. - **list** (array) - An array of notification result objects. - **platform** (string) - The platform of the notification (e.g., IOS, ANDROID). - **status** (string) - The status of the notification (e.g., FAILED, SUCCESS). - **errorCode** (string) - Error code if the status is FAILED. - **installationId** (string) - The ID of the installation. - **errorMsg** (string) - Error message if the status is FAILED. - **timeStamp** (integer) - Timestamp of the event. - **msgTitle** (string) - The title of the message. - **msgText** (string) - The text content of the message. - **extId** (string) - External ID, if applicable. #### Response Example ```json { "nextPage": "https://restapi.netmera.com/rest/3.0/getPushResult?offset=hJbolUuHucJ9dd&max=10", "list": [ { "platform": "IOS", "status": "FAILED", "errorCode": "8", "installationId": "C2Ii2ztdEaok0", "errorMsg": "INVALID_TOKEN", "timeStamp": 1557819194426, "msgTitle": "Awesome Title", "msgText": "How is it going, Jon?" }, { "platform": "ANDROID", "status": "SUCCESS", "installationId": "U7IwgcM8phSmv", "extId": "B4A92950-B0FD-43E6-B312-C3EE088890BD", "timeStamp": 1557819194426, "msgTitle": "Awesome Title", "msgText": "How is it going, Jon?" } ] } ``` ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://user.netmera.com/netmera-developer-guide/platforms/react-native/user-and-attributes Use this method to ask questions about the documentation dynamically. The response includes direct answers and relevant excerpts. ```bash GET https://user.netmera.com/netmera-developer-guide/platforms/react-native/user-and-attributes.md?ask= ``` -------------------------------- ### Query Documentation via GET Request Source: https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/push-notifications/delegate-methods To get additional information not directly present on the page, perform an HTTP GET request with the 'ask' query parameter to the page URL. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/push-notifications/delegate-methods.md?ask= ``` -------------------------------- ### Sample fetchCoupons Method Source: https://user.netmera.com/netmera-developer-guide/platforms/react-native/changelog Demonstrates how to use the `fetchCoupons` method to retrieve coupon data. It logs the result on success or the error on failure. ```javascript Netmera.fetchCoupons(0, 2) .then(result => { console.log(result); }) .catch(error => console.log(error)); ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://user.netmera.com/netmera-developer-guide/integrations/sms-providers/infobip To get information not directly on the page, make an HTTP GET request to the page URL with an 'ask' query parameter. The question should be specific and in natural language. ```bash GET https://user.netmera.com/netmera-developer-guide/integrations/sms-providers/infobip.md?ask= ``` -------------------------------- ### Example SMS Rejection Notification Source: https://user.netmera.com/netmera-developer-guide/integrations/via-integration/etk-rejection-via-sms An example of a correctly formatted SMS rejection notification. ```plaintext RET SDXNETMERA SDXIYS → 3338 ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/integrations/marketing-platforms Use this GET request to ask questions about the documentation. The `ask` parameter should contain your specific question in natural language. ```bash GET https://user.netmera.com/netmera-developer-guide/integrations/marketing-platforms.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/push-inbox To get additional information not present on the page, perform an HTTP GET request to the current page URL with the 'ask' query parameter. The question should be specific and in natural language. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/push-inbox.md?ask= ``` -------------------------------- ### Install Flutter Package Source: https://user.netmera.com/netmera-developer-guide/platforms/flutter/sdk-integration Run this command in your project's root directory after updating `pubspec.yaml` to fetch the SDK. ```bash $ flutter pub get ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://user.netmera.com/netmera-developer-guide/integrations/email-providers/uzman-posta To get specific information not readily available, you can query the documentation dynamically. This involves making an HTTP GET request to the current page URL with an 'ask' query parameter containing your question. ```HTTP GET https://user.netmera.com/netmera-developer-guide/integrations/email-providers/uzman-posta.md?ask= ``` -------------------------------- ### Unity Netmera SDK Integration Example Source: https://user.netmera.com/netmera-developer-guide/platforms/unity/sdk-integration This C# script demonstrates how to initialize the Netmera SDK in a Unity project, send events, update user data, manage inbox items, and implement callback methods for push notifications and inbox operations. Attach this script to a GameObject in your Unity scene. ```csharp using System; using System.Collections; using System.Collections.Generic; using Netmera; using UnityEngine; public class NetmeraGameObject : MonoBehaviour, Netmera.Callback { [SerializeField] private bool loggingEnabled = true; private void Awake() { Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None); DontDestroyOnLoad(gameObject); Test_Init(); } public void Test_Init() { if (NetmeraCore.Instance == null) { return; } NetmeraCore.Instance.LoggingEnabled = loggingEnabled; NetmeraCore.Instance.Init(this); } /* Sample method calls */ public void Test_SendEvent() { JSONObject obj = new JSONObject(); obj["ea"] = "valuesample"; obj["ec"] = 10; NetmeraCore.Instance.SendEvent("zzl", obj); } public void Test_UpdateUser() { NetmeraUser user = new NetmeraUser(); user.SetBirthday("1980", "06", "26"); user.SetCity("Istanbul"); NetmeraCore.Instance.UpdateUser(user); } public void Test_FetchInbox() { List categories = new List() {}; NetmeraCore.Instance.FetchInbox(20, NetmeraEnum.PushStatus.ReadOrUnread, categories, true); } public void Test_FetchNextPage() { NetmeraCore.Instance.FetchNextPage(); } public void Test_Destroy() { NetmeraCore.Instance.Destroy(); } public void Test_EnablePopupPresentation(bool isEnabled) { NetmeraCore.Instance.EnablePopupPresentation(isEnabled); } public void Test_GetStatusCount() { NetmeraCore.Instance.GetStatusCount(NetmeraEnum.PushStatus.ReadOrUnread); } public void Test_ChangeInboxItemStatuses() { NetmeraCore.Instance.ChangeInboxItemStatuses(1, 2, NetmeraEnum.PushStatus.Deleted); } public void Test_RequestPermissionsForLocation() { NetmeraCore.Instance.RequestPermissionsForLocation(); } public void Test_ChangeAllInboxItemStatuses() { NetmeraCore.Instance.ChangeAllInboxItemStatuses(NetmeraEnum.PushStatus.Deleted); } // Callbacks public void OnPushRegister(string gcmSenderId, string pushToken) { } public void OnPushReceive(JSONNode rawJson, NetmeraPushObject pushObject) { } public void OnPushOpen(JSONNode rawJson, NetmeraPushObject pushObject) { } public void OnPushDismiss(JSONNode rawJson, NetmeraPushObject pushObject) { } public void OnPushButtonClicked(JSONNode rawJson, NetmeraPushObject pushObject) { } public void OnInboxFetchSuccess(JSONNode netmeraPushInboxJSON) { } public void OnInboxFetchFail(int errorCode, string errorMessage) { } public void OnInboxNextPageFetchSuccess(JSONNode netmeraPushInboxJSON) { } public void OnInboxNextPageFetchFail(int errorCode, string errorMessage) { } public void OnInboxStatusChangeSuccess() { } public void OnInboxStatusChangeFail(int errorCode, string errorMessage) { } public void OnInboxStatusCount(int countWithThatStatus) { } } ``` -------------------------------- ### Configure Podfile for New Architecture or Firebase Static Frameworks Source: https://user.netmera.com/netmera-developer-guide/platforms/react-native/migration-to-2.x Add a pre_install block to the Podfile to set Netmera and Swinject pods to use dynamic frameworks. This is required when using the New Architecture or Firebase as static frameworks. ```ruby pre_install do |installer| installer.pod_targets.each do |pod| if pod.name.start_with?('Netmera') || pod.name.include?('Swinject') def pod.build_type Pod::BuildType.dynamic_framework end end end end ``` -------------------------------- ### Install Cordova Plugin Source: https://user.netmera.com/netmera-developer-guide/platforms/cordova/sdk-integration Install the Netmera Cordova plugin using the ionic CLI. This command adds the plugin to your project. ```typescript ionic cordova plugin add cordova-plugin-netmera-v2 ``` -------------------------------- ### Initialize Netmera SDK with Session Callback Source: https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/changelog Initializes the Netmera SDK and provides a callback to check if the session started successfully. ```swift Netmera.initialize { isSuccess in if isSuccess { print("Netmera started successfully") } else { print("Netmera failed to start") } } ``` -------------------------------- ### Querying Documentation with GET Request Source: https://user.netmera.com/netmera-developer-guide/platforms/flutter To get additional information not directly present on a page, perform an HTTP GET request to the page URL with the 'ask' query parameter. The question should be specific and in natural language. The response includes a direct answer and relevant excerpts. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/flutter.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/platforms/android/sdk-integration Use this GET request to ask questions about the documentation and receive direct answers and relevant excerpts. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/android/sdk-integration.md?ask= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://user.netmera.com/netmera-developer-guide/integrations/marketing-platforms/optimove Use this method to ask specific questions about the documentation. The question should be self-contained and in natural language. The response includes a direct answer and relevant excerpts. ```bash GET https://user.netmera.com/netmera-developer-guide/integrations/marketing-platforms/optimove.md?ask= ``` -------------------------------- ### Install iOS Pods Source: https://user.netmera.com/netmera-developer-guide/platforms/flutter/sdk-integration Run this command in your terminal within the iOS folder of your project to install the necessary pods for the Netmera SDK. ```shell $ pod install ``` -------------------------------- ### Initialize Netmera SDK with Callbacks Source: https://user.netmera.com/netmera-developer-guide/platforms/android/push-notifications/push-callbacks Configure and initialize the Netmera SDK with different callback handlers during the application's creation. Ensure all necessary sender IDs and logging preferences are set. ```kotlin override fun onCreate() { super.onCreate() val configBuilder = NetmeraConfiguration.Builder() .apiKey(apiKey) .firebaseSenderId(PropertiesUtil.gcmSenderId) .huaweiSenderId(PropertiesUtil.hmsSenderId) // For Huawei services .logging(true) // Enables Netmera logs in Logcat .nmPushActionCallbacks(NGPushActionCallbacks()) // Push Action Callback .nmInAppMessageActionCallbacks(NGInAppMessageActionCallbacks()) // In-App Message Callback .nmWebWidgetCallbacks(NGWebWidgetCallbacks()) // Web Widget Callback .nmPushPresentationCallbacks(NMPushPresentationCallbacks()) // In-App Presentation Callback Netmera.init(configBuilder.build(this)) } ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/integrations/via-integration To get additional information not directly present on a page, perform an HTTP GET request with the 'ask' query parameter. ```http GET https://user.netmera.com/netmera-developer-guide/integrations/via-integration.md?ask= ``` -------------------------------- ### Start Live Activity Locally with Netmera Source: https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/live-activities Initiates a Live Activity locally on the device using ActivityKit and registers it with Netmera for push-based updates. Ensure to use `.token` for the pushType to enable Netmera's management of the push token. ```swift import NetmeraCore import NetmeraLiveActivity import ActivityKit class LiveActivityManager { func startMatchActivity() { let attributes = MatchScoreAttributes( netmeraGroupId: "ars-liv-2025", homeTeamName: "Arsenal", awayTeamName: "Liverpool", homeTeamLogo: "arsenal_logo", awayTeamLogo: "liverpool_logo" ) let contentState = MatchScoreAttributes.ContentState( homeTeamScore: 0, awayTeamScore: 0, matchStatus: "1st half" ) matchActivity = try Activity.request( attributes: attributes, contentState: contentState, pushType: .token // Important: Use ".token" to enable Netmera to manage push-based updates ) if let matchActivity { Netmera.observeActivity(matchActivity) } } } ``` -------------------------------- ### Querying Documentation via API Source: https://user.netmera.com/netmera-developer-guide/platforms/android/deep-linking/custom-deep-links Demonstrates how to dynamically query the documentation for additional information using an HTTP GET request with an 'ask' query parameter. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/android/deep-linking/custom-deep-links.md?ask= ``` -------------------------------- ### Dynamic Documentation Query Source: https://user.netmera.com/netmera-developer-guide/platforms/android/sdk-integration/huawei-integration Use this GET request to ask specific questions about the documentation. The response includes direct answers and relevant excerpts. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/android/sdk-integration/huawei-integration.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/integrations/messaging-provider Perform an HTTP GET request to query the documentation dynamically with the 'ask' query parameter. Use this for clarification or additional context. ```http GET https://user.netmera.com/netmera-developer-guide/integrations/messaging-provider.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/platforms/cordova To get specific information not found on the page, make an HTTP GET request with the `ask` query parameter. The question should be clear and self-contained. ```HTTP GET https://user.netmera.com/netmera-developer-guide/platforms/cordova.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api/user-and-device-management To get additional information not present on the page, perform an HTTP GET request with the 'ask' query parameter. The question should be specific and self-contained. ```http GET https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api/user-and-device-management.md?ask= ``` -------------------------------- ### Add Dependencies (Podfile) Source: https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/geofence-and-location Instructions for adding Netmera location and geofence SDKs when using a Podfile. ```APIDOC ## Add Dependencies (If Using a Podfile) ### Description If your project uses a Podfile, add the following dependencies to integrate Netmera's location and geofence capabilities. ### Code ```swift pod "NetmeraLocation" pod "NetmeraGeofence" ``` ``` -------------------------------- ### Querying Documentation Source: https://user.netmera.com/netmera-developer-guide/platforms/web/mobile-web-push-for-ios To get additional information not directly on the page, make an HTTP GET request to the page URL with an 'ask' query parameter containing your specific question. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/web/mobile-web-push-for-ios.md?ask= ``` -------------------------------- ### Configure Podfile for iOS Source: https://user.netmera.com/netmera-developer-guide/platforms/flutter/sdk-integration Add this post_install block to your Podfile to ensure the 'BUILD_LIBRARY_FOR_DISTRIBUTION' setting is enabled for Swinject targets, which is necessary for certain build configurations. ```ruby post_install do |installer| installer.pods_project.targets.each do |target| if target.name.include?('Swinject') target.build_configurations.each do |config| config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' end end end end ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://user.netmera.com/netmera-developer-guide/platforms Use this method to ask questions about the documentation when information is not directly available. The question should be specific and in natural language. ```bash GET https://user.netmera.com/netmera-developer-guide/platforms.md?ask= ``` -------------------------------- ### Querying Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/platforms/ios To get additional information not directly present on a page, perform an HTTP GET request with the 'ask' query parameter. The question should be specific and self-contained. ```HTTP GET https://user.netmera.com/netmera-developer-guide/platforms/ios.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/platforms/cordova/sdk-integration To get additional information not present on the page, make an HTTP GET request to the documentation URL with an 'ask' query parameter containing your question. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/cordova/sdk-integration.md?ask= ``` -------------------------------- ### Query Documentation via API Source: https://user.netmera.com/netmera-developer-guide/platforms/cordova/user-and-attributes To get more information not directly on this page, make an HTTP GET request to the page URL with an 'ask' query parameter containing your question. ```http GET https://user.netmera.com/netmera-developer-guide/platforms/cordova/user-and-attributes.md?ask= ``` -------------------------------- ### Invalid SMS Short URL Request Example Source: https://user.netmera.com/netmera-developer-guide/integrations/via-integration/short-url-consent-requests This example illustrates an invalid request where the `verificationType` is set to `SMS_SHORTURL` but the `types` array contains an incompatible `EPOSTA` value. ```APIDOC ## Invalid SMS Short URL Request ### Description This section details an error scenario where an SMS short URL request is made with an incompatible consent type. Specifically, using `EPOSTA` within the `types` array when `verificationType` is `SMS_SHORTURL` will result in an error. ### Method POST ### Endpoint /rest/via/consent ### Parameters #### Request Body - **consentTypes** (Array) - Required - Contains consent details. - **title** (String) - Required - Approval type (e.g., "KVK"). - **types** (Array of Strings) - Required - Communication channels. An invalid combination (e.g., `["EPOSTA"]` with `SMS_SHORTURL`) will cause an error. - **recipientType** (String) - Required - Type of recipient. - **formId** (String) - Required - The ID of the approval form. - **recipient** (String) - Required - Recipient's communication address. - **verificationType** (String) - Required - The type of verification. Set to `SMS_SHORTURL` in this invalid case. - **referenceId** (String) - Required - A unique reference ID for the request. ### Request Example ```json { "consentTypes": [ { "title": "KVK", "types": ["EPOSTA"], "recipientType": "BIREYSEL" } ], "formId": "your_formId", "recipient": "+9053........", "verificationType": "SMS_SHORTURL", "referenceId": "user1234" } ``` ### Response #### Error Response (HTTP 400) - **message** (String) - Describes the error, indicating the incompatible consent type for the verification method. - **code** (String) - An error code (e.g., "H1085"). #### Response Example ```json { "message": "Girdiğiniz 'EPOSTA' izin tipi, doğrulama tipi 'SMS_SHORTURL' ile uyuşmamaktadır. Uyuşan geçerli değerler: [SMS_FATURA, MESAJ, E_FATURA, AYDINLATMA_METNI, ACIK_RIZA_METNI, YURTDISI_AKTARIM, UYELIK_ONAYI, ARAMA]", "code": "H1085" } ``` ``` -------------------------------- ### Initialize Netmera with Callbacks Source: https://user.netmera.com/netmera-developer-guide/platforms/android/changelog Implement onSuccess and onFailure callbacks for the Netmera init method to handle session initialization results. ```java Netmera.init(configBuilder.build(this), new NMInitSessionListener() { @Override public void onSuccess() { Log.i("NetmeraApp", "Session init completed"); } @Override public void onFailure(String error) { Log.e("NetmeraApp", "Error occurred when trying to init session with Netmera. Error::"+error ); } }); ``` -------------------------------- ### Initialize Netmera with API Key (Objective-C SDK) Source: https://user.netmera.com/netmera-developer-guide/platforms/ios/migration-to-swift-sdk This Swift code demonstrates how to initialize the legacy Objective-C Netmera SDK in your AppDelegate. It includes setting the API key and log level. ```swift // AppDelegate.swift func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { Netmera.start() Netmera.setAPIKey("YOUR_CLIENT_API_KEY") Netmera.setLogLevel(NetmeraLogLevel.debug) return true } ``` -------------------------------- ### Cancel Order Event Example Source: https://user.netmera.com/netmera-developer-guide/api-documentation/rest-api/events An example demonstrating how to fire an `OrderCancelEvent` with relevant order-related attributes. Fields must be configured in the event schema via the Netmera panel. ```APIDOC ## POST /rest/3.0/fireEvents (OrderCancelEvent Example) ### Description This example demonstrates how to fire an `OrderCancelEvent` with relevant order-related attributes. The fields used in this example must be configured in the event schema through the Netmera panel. ### Method POST ### Endpoint /rest/3.0/fireEvents ### Request Headers * `X-netmera-api-key`: Your REST API key * `Content-Type`: `application/json` ### Parameters #### Request Body - `extId` (string, required): Unique identifier of the user in your system. - `name` (string, required): Name of the event (e.g., "OrderCancelEvent"). - `paymentMethod` (string, optional): Payment method used for the order. - `subTotal` (number, optional): Subtotal of the order. - `itemCount` (integer, optional): Number of items in the order. - `grandTotal` (number, optional): Grand total of the order. ### Request Example ```json [ { "extId": "id_in_my_system_1", "name": "OrderCancelEvent", "paymentMethod": "Credit Card", "subTotal": 20.0, "itemCount": 4, "grandTotal": 35.0 } ] ``` ### Response #### Success Response (200) (Response structure not explicitly defined in source, but implies success for valid requests) #### Response Example (No specific success response example provided in source) ``` -------------------------------- ### Query Documentation Dynamically Source: https://user.netmera.com/netmera-developer-guide/integrations/sms-providers/jet-sms To get more information not present on the page, make an HTTP GET request to the current URL with the 'ask' query parameter. The question should be specific and in natural language. ```http GET https://user.netmera.com/netmera-developer-guide/integrations/sms-providers/jet-sms.md?ask= ```