countly-sdk-react-native-bridge
Advanced tools
Comparing version 24.4.1 to 25.1.0
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
"source.fixAll.eslint": true | ||
}, | ||
@@ -5,0 +5,0 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", |
@@ -0,1 +1,51 @@ | ||
## 25.1.0 | ||
* ! Minor breaking change ! `Countly.userDataBulk.save()` method is now optional. SDK will save the cached data with internal triggers regularly. | ||
* Added Content feature methods: | ||
* `enterContentZone`, to start Content checks (Experimental!) | ||
* `exitContentZone`, to stop Content checks (Experimental!) | ||
* Added feedback widget convenience methods to display the first available widget or the one meets the criteria: | ||
* `Countly.feedback.showNPS(nameIDorTag?: string, widgetClosedCallback?: WidgetCallback): void` | ||
* `Countly.feedback.showSurvey(nameIDorTag?: string, widgetClosedCallback?: WidgetCallback): void` | ||
* `Countly.feedback.showRating(nameIDorTag?: string, widgetClosedCallback?: WidgetCallback): void` | ||
* Added config interface `experimental` that provides experimental config options: | ||
* `.experimental.enablePreviousNameRecording()` for reporting previous event/view names | ||
* `.experimental.enableVisibilityTracking()` for reporting app visibility with events | ||
* Added `Countly.deviceId.setID` method for changing device ID based on the device ID type | ||
* Added support for Arrays of primitive types in event segmentation | ||
* Deprecated following SDK calls: | ||
* `Countly.getCurrentDeviceId` (replaced with: `Countly.deviceId.getID`) | ||
* `Countly.getDeviceIDType` (replaced with: `Countly.deviceId.getType`) | ||
* `Countly.changeDeviceId` (replaced with: `Countly.deviceId.setID`) | ||
* Mitigated an issue where a session could have started while the app was in the background when the device ID was changed (non-merge). | ||
* Mitigated an issue where intent redirection checks were disabled by default | ||
* Mitigated an issue crash tracking was not enabled with init config | ||
* Mitigated an issue where app start time tracking was on by default | ||
* Android Specific Changes: | ||
* ! Minor breaking change ! Unsupported types for user properties will now be omitted, they won't be converted to strings. | ||
* Disabled caching for webviews. | ||
* Mitigated an issue in the upload plugin that prevented the upload of a symbol file | ||
* Resolved a problem where revoked consents were sent after changes without merging. | ||
* Mitigated an issue that caused the device ID to be incorrectly set after changes with merging. | ||
* Mitigated an issue where on consent revoke, remote config values were cleared, not anymore. | ||
* iOS Specific Changes: | ||
* Orientation info is now also sent during initialization | ||
* Added visionOS build support | ||
* Updated the SDK to ensure compatibility with the latest server response models | ||
* Improved view tracking capabilities | ||
* Mitigated an issue with the feedback widget URL encoding on iOS 16 and earlier, which prevented the widget from displaying | ||
* Mitigated an issue with content fetch URL encoding on iOS 16 and earlier, which caused the request to fail | ||
* Mitigated an issue where the terms and conditions URL (`tc` key) was sent without double quotes | ||
* Mitigated an issue where consent information was not sent when no consent was given during initialization | ||
* Mitigated an issue where a session did not end when session consent was removed | ||
* Mitigated an issue where pausing a view resulted in a '0' view duration. | ||
* Mitigated an issue where the user provided URLSessionConfiguration was not applied to direct requests | ||
* Updated the underlying Android SDK version to 24.7.8 | ||
* Updated the underlying iOS SDK version to 24.7.9 | ||
## 24.4.1 | ||
@@ -2,0 +52,0 @@ * Added support for Feedback Widget terms and conditions |
interface Segmentation { | ||
[key: string]: number | string | boolean; | ||
[key: string]: number | string | boolean | (number | string | boolean)[]; | ||
} | ||
@@ -92,3 +92,26 @@ | ||
namespace feedback { | ||
/** | ||
* Shows the first available NPS widget that meets the criteria. | ||
* @param {String} [nameIDorTag] - name, id, or tag of the widget to show (optional) | ||
* @param {callback} [widgetClosedCallback] - called when the widget is closed (optional) | ||
*/ | ||
export function showNPS(nameIDorTag?: string, widgetClosedCallback?: WidgetCallback): void; | ||
/** | ||
* Shows the first available survey widget that meets the criteria. | ||
* @param {String} [nameIDorTag] - name, id, or tag of the widget to show (optional) | ||
* @param {callback} [widgetClosedCallback] - called when the widget is closed (optional) | ||
*/ | ||
export function showSurvey(nameIDorTag?: string, widgetClosedCallback?: WidgetCallback): void; | ||
/** | ||
* Shows the first available rating widget that meets the criteria. | ||
* @param {String} [nameIDorTag] - name, id, or tag of the widget to show (optional) | ||
* @param {callback} [widgetClosedCallback] - called when the widget is closed (optional) | ||
*/ | ||
export function showRating(nameIDorTag?: string, widgetClosedCallback?: WidgetCallback): void; | ||
/** | ||
* Get a list of available feedback widgets as an array of objects. | ||
@@ -110,3 +133,3 @@ * @param {FeedbackWidgetCallback} [onFinished] - returns (retrievedWidgets, error). This parameter is optional. | ||
*/ | ||
export function presentFeedbackWidget(feedbackWidget: FeedbackWidget, closeButtonText: string, widgetShownCallback: callback, widgetClosedCallback: callback): ErrorObject; | ||
export function presentFeedbackWidget(feedbackWidget: FeedbackWidget, closeButtonText: string, widgetShownCallback: WidgetCallback, widgetClosedCallback: WidgetCallback): ErrorObject; | ||
@@ -182,2 +205,17 @@ /** | ||
/** | ||
* Countly Content Module | ||
*/ | ||
namespace content { | ||
/** | ||
* Opt in user for the content fetching and updates | ||
*/ | ||
export function enterContentZone(): void; | ||
/** | ||
* Opt out user from the content fetching and updates | ||
*/ | ||
export function exitContentZone(): void; | ||
} | ||
/** | ||
* Initialize Countly | ||
@@ -393,3 +431,4 @@ * | ||
/** | ||
* | ||
* @deprecated use 'Countly.deviceId.getID' instead of 'Countly.getCurrentDeviceId' | ||
* | ||
* Get currently used device Id. | ||
@@ -403,2 +442,4 @@ * Should be called after Countly init | ||
/** | ||
* @deprecated use 'Countly.deviceId.getType' instead of 'Countly.getDeviceIDType' | ||
* | ||
* Get currently used device Id type. | ||
@@ -412,2 +453,4 @@ * Should be called after Countly init | ||
/** | ||
* @deprecated use 'Countly.deviceId.setID' instead of 'Countly.changeDeviceId' | ||
* | ||
* Change the current device id | ||
@@ -421,2 +464,30 @@ * | ||
namespace deviceId { | ||
/** | ||
* | ||
* Get currently used device ID. | ||
* Should be called after Countly init | ||
* | ||
* @returns {string | null} device ID or null | ||
*/ | ||
export function getID(): Promise<string> | string; | ||
/** | ||
* | ||
* Get currently used device ID type. | ||
* Should be called after Countly init | ||
* | ||
* @return {DeviceIdType | null} deviceIdType or null | ||
*/ | ||
export function getType(): Promise<DeviceIdType> | null; | ||
/** | ||
* Sets device ID according to the device ID Type. | ||
* If previous ID was Developer Supplied sets it without merge, otherwise with merge. | ||
* | ||
* @param {string} newDeviceID device ID to set | ||
*/ | ||
export function setID(newDeviceID: string): void; | ||
} | ||
/** | ||
@@ -1107,2 +1178,14 @@ * | ||
declare module "countly-sdk-react-native-bridge/CountlyConfig" { | ||
interface experimental { | ||
/** | ||
* Enables previous name recording for views and events | ||
*/ | ||
enablePreviousNameRecording(): this; | ||
/** | ||
* Enables app visibility tracking with events. | ||
*/ | ||
enableVisibilityTracking(): this; | ||
} | ||
/** | ||
@@ -1201,2 +1284,7 @@ * | ||
/** | ||
* getter for experimental features | ||
*/ | ||
experimental: experimental; | ||
/** | ||
* Method to set the server url | ||
@@ -1203,0 +1291,0 @@ * |
import { initialize } from "./Logger.js"; | ||
import CountlyConfigApm from "./lib/configuration_interfaces/countly_config_apm.js"; | ||
import CountlyConfigSDKInternalLimits from "./lib/configuration_interfaces/countly_config_limits.js"; | ||
import CountlyConfigExp from "./lib/configuration_interfaces/countly_config_experimental.js"; | ||
/** | ||
@@ -18,2 +19,5 @@ * Countly SDK React Native Bridge | ||
class CountlyConfig { | ||
#crashReporting = false; | ||
#apmLegacy = false; | ||
#disableIntentRedirectionCheck = false; | ||
constructor(serverURL, appKey) { | ||
@@ -24,2 +28,3 @@ this.serverURL = serverURL; | ||
this._countlyConfigSDKLimitsInstance = new CountlyConfigSDKInternalLimits(); | ||
this._countlyConfigExpInstance = new CountlyConfigExp(); | ||
} | ||
@@ -34,2 +39,5 @@ | ||
/** | ||
* Getter to get the SDK internal limits | ||
*/ | ||
get sdkInternalLimits() { | ||
@@ -40,2 +48,21 @@ return this._countlyConfigSDKLimitsInstance; | ||
/** | ||
* Getter to get the experimental configurations | ||
*/ | ||
get experimental() { | ||
return this._countlyConfigExpInstance; | ||
} | ||
get _crashReporting() { | ||
return this.#crashReporting; | ||
} | ||
get _apmLegacy() { | ||
return this.#apmLegacy; | ||
} | ||
get _disableIntentRedirectionCheck() { | ||
return this.#disableIntentRedirectionCheck; | ||
} | ||
/** | ||
* Method to set the server url | ||
@@ -86,3 +113,3 @@ * | ||
enableCrashReporting() { | ||
this.crashReporting = true; | ||
this.#crashReporting = true; | ||
return this; | ||
@@ -150,3 +177,3 @@ } | ||
enableApm() { | ||
this.enableApm = true; | ||
this.#apmLegacy = true; | ||
return this; | ||
@@ -160,3 +187,3 @@ } | ||
disableAdditionalIntentRedirectionChecks() { | ||
this.disableAdditionalIntentRedirectionChecks = true; | ||
this.#disableIntentRedirectionCheck = true; | ||
return this; | ||
@@ -163,0 +190,0 @@ } |
# Creating the Sample Countly RN App | ||
To run a React Native application you have to set up your environment correctly. | ||
Please refer to the React Native [documentation](https://reactnative.dev/docs/environment-setup) to check the latest information on this topic. | ||
Please refer to the React Native [documentation](https://reactnative.dev/docs/set-up-your-environment)* to check the latest information on this topic. | ||
(Incase there is a change in documentation links you should check the React Native [offical site](https://reactnative.dev/)) | ||
## Automatic App Creation | ||
@@ -22,2 +24,3 @@ | ||
## Manual App Creation | ||
For more information you can check [here](https://reactnative.dev/docs/getting-started-without-a-framework). | ||
@@ -27,3 +30,5 @@ If you want to set up the app manually instead, then you should run: | ||
```bash | ||
npx react-native@latest init AwesomeProject | ||
npx @react-native-community/cli@latest init AwesomeProject --version 0.74.0 | ||
# Version here may vary but make sure to use a stabile version of the react-native | ||
# Latest versions can experience issues because of unstability | ||
``` | ||
@@ -48,3 +53,22 @@ | ||
``` | ||
## Debugging | ||
For possible java issues you can try some of the following options: | ||
- changing the IDE settings. | ||
- changing the JAVA_HOME environment variable. | ||
- changing `org.gradle.java.home` in `gradle.properties`. | ||
Currently Java 17 and bigger is needed. | ||
For a ninja issue about path length you might want to download and point to a specific ninja version: | ||
```java | ||
// under app level build.gradle's defaultConfig | ||
externalNativeBuild { | ||
cmake { | ||
arguments "-DCMAKE_MAKE_PROGRAM=your_path\ninja.exe", "-DCMAKE_OBJECT_PATH_MAX=1024" | ||
} | ||
} | ||
``` | ||
For an issue with the recent version of React Native (0.76) about safe area context you can check this [thread](https://github.com/th3rdwave/react-native-safe-area-context/issues/539#issuecomment-2436529368). | ||
## iOS Push Notification Documentation | ||
@@ -51,0 +75,0 @@ |
@@ -11,2 +11,72 @@ import * as L from "./Logger.js"; | ||
/** | ||
* Shows the first available NPS widget that meets the criteria. | ||
* @param {String} [nameIDorTag] - name, id, or tag of the widget to show (optional) | ||
* @param {callback} [callback] - called when the widget is closed (optional) | ||
*/ | ||
showNPS(nameIDorTag, callback) { | ||
L.i(`showNPS, Will show NPS widget with name, id, or tag: [${nameIDorTag}], callback provided: [${typeof callback === "function"}]`); | ||
this.#showInternalFeedback("nps", nameIDorTag, callback); | ||
} | ||
/** | ||
* Shows the first available Survey widget that meets the criteria. | ||
* @param {String} [nameIDorTag] - name, id, or tag of the widget to show (optional) | ||
* @param {callback} [callback] - called when the widget is closed (optional) | ||
*/ | ||
showSurvey(nameIDorTag, callback) { | ||
L.i(`showSurvey, Will show Survey widget with name, id, or tag: [${nameIDorTag}], callback provided: [${typeof callback === "function"}]`); | ||
this.#showInternalFeedback("survey", nameIDorTag, callback); | ||
} | ||
/** | ||
* Shows the first available Rating widget that meets the criteria. | ||
* @param {String} [nameIDorTag] - name, id, or tag of the widget to show (optional) | ||
* @param {callback} [callback] - called when the widget is closed (optional) | ||
*/ | ||
showRating(nameIDorTag, callback) { | ||
L.i(`showRating, Will show Rating widget with name, id, or tag: [${nameIDorTag}], callback provided: [${typeof callback === "function"}]`); | ||
this.#showInternalFeedback("rating", nameIDorTag, callback); | ||
} | ||
#showInternalFeedback(widgetType, nameIDorTag, callback) { | ||
if (!this.#state.isInitialized) { | ||
L.e(`showInternalFeedback, 'init' must be called before 'showInternalFeedback'`); | ||
return; | ||
} | ||
if (typeof nameIDorTag !== "string") { | ||
L.d(`showInternalFeedback, unsupported data type of nameIDorTag or its not given : [${typeof nameIDorTag}]`); | ||
} | ||
this.getAvailableFeedbackWidgets((retrievedWidgets, error) => { | ||
if (error) { | ||
L.e(`showInternalFeedback, ${error}`); | ||
return; | ||
} | ||
if (!retrievedWidgets || retrievedWidgets.length === 0) { | ||
L.d(`showInternalFeedback, no feedback widgets found`); | ||
return; | ||
} | ||
L.d(`showInternalFeedback, Found [${retrievedWidgets.length}] feedback widgets`); | ||
let widget = retrievedWidgets.find(w => w.type === widgetType); | ||
try { | ||
if (nameIDorTag && typeof nameIDorTag === 'string') { | ||
const matchedWidget = retrievedWidgets.find(w => | ||
w.type === widgetType && (w.name === nameIDorTag || w.id === nameIDorTag || w.tags.includes(nameIDorTag)) | ||
); | ||
if (matchedWidget) { | ||
widget = matchedWidget; | ||
L.v(`showInternalFeedback, Found ${widgetType} widget by name, id, or tag: [${JSON.stringify(matchedWidget)}]`); | ||
} | ||
} | ||
} catch (error) { | ||
L.e(`showInternalFeedback, Error while finding widget: ${error}`); | ||
} | ||
if (!widget) { | ||
L.d(`showInternalFeedback, No ${widgetType} widget found.`); | ||
return; | ||
} | ||
this.presentFeedbackWidget(widget, null, null, callback); | ||
}); | ||
} | ||
/** | ||
* Get a list of available feedback widgets as an array of objects. | ||
@@ -23,3 +93,3 @@ * @param {callback} [onFinished] - returns (retrievedWidgets, error). This parameter is optional. | ||
L.d("getAvailableFeedbackWidgets, getAvailableFeedbackWidgets"); | ||
L.d("getAvailableFeedbackWidgets, fetching available feedback widgets"); | ||
let result = null; | ||
@@ -26,0 +96,0 @@ let error = null; |
@@ -0,1 +1,71 @@ | ||
## 24.7.9 | ||
* Improved view tracking capabilities | ||
## 24.7.8 | ||
* Added support for localization of content blocks. | ||
* Mitigated an issue where visibility could have been wrongly assigned if a view was closed while going to background. (Experimental!) | ||
* Mitigated an issue where the user provided URLSessionConfiguration was not applied to direct requests | ||
* Mitigated an issue where a concurrent modification error could have happen when starting multiple stopped views | ||
* Mitigated an issue that parsing internal content event segmentation. | ||
## 24.7.7 | ||
* Changed the visibility tracking segmentation values to binary | ||
## 24.7.6 | ||
* Mitigated an issue with experimental visibility tracking and previous name recording, ensuring they’re included even when no segmentation is provided in event or view recording. | ||
## 24.7.5 | ||
* Mitigated an issue with content action json parsing due to json encoding | ||
* Mitigated an issue where pausing a view resulted in a '0' view duration. | ||
* Mitigated an issue where an internal timer was not reset when going to foreground for `autoStoppedViews` | ||
* Mitigated an issue for `autoStoppedViews` could have not started when multiple views were open at the same time while going to foreground | ||
## 24.7.4 | ||
* Added visionOS build support | ||
* Added `CountlyFeedbacks:` interface with new view methods (Access with `Countly.sharedInstance.feedback`): | ||
* Method to present feedback widget (wih an optional widget selector(name, ID or tag) string and a Callback): | ||
* `presentNPS` | ||
* `presentSurvey` | ||
* `presentRating` | ||
* `getAvailableFeedbackWidgets` method to retrieve available feedback widgets with a completion handler. | ||
* Mitigated an issue with the feedback widget URL encoding on iOS 16 and earlier, which prevented the widget from displaying | ||
* Mitigated an issue with content fetch URL encoding on iOS 16 and earlier, which caused the request to fail | ||
* Deprecated `getFeedbackWidgets` method, you should use `[feedback getAvailableFeedbackWidgets:]` method instead | ||
## 24.7.3 | ||
* Added current view names to event segmentation based on the `enablePreviousNameRecording` (Experimental!) | ||
* Updated the SDK to ensure compatibility with the latest server response models | ||
## 24.7.2 | ||
* Automatic view pause/resumes are changed with stop/start for better data consistency. | ||
* Added the config interface 'experimental' to group experimental features. | ||
* Added a flag (enablePreviousNameRecording) to add previous event and view names as segmentation. (Experimental!) | ||
* Added a flag (enableVisibilityTracking) to add app visibility info to views | ||
* Added Content feature methods: | ||
- enterContentZone, to start Content checks(Experimental!) | ||
- exitContentZone, to stop content checks (Experimental!) | ||
## 24.7.1 | ||
* Added `enableTemporaryDeviceIDMode` config and post-initialization methods to enable temporary device ID mode | ||
* Orientation info is now also sent during initialization | ||
* Mitigated an issue where consent information was not sent when no consent was given during initialization | ||
* Mitigated an issue where a session could have started if the SDK was initialized on the background and automatic session tracking was enabled | ||
* Mitigated an issue where a session did not end when session consent was removed | ||
* Mitigated an issue where disabling location did not work | ||
## 24.7.0 | ||
* Implemented automatic sending of user properties to the server without requiring an explicit call to the `save` method | ||
* Added `setID` method for changing device ID based on the device ID type | ||
* Enhanced segmentation values to include additional supported data types beyond `NSString` | ||
* Fixed web view caching issue for widgets | ||
* Mitigated an issue where the terms and conditions URL (`tc` key) was sent without double quotes | ||
* Mitigated an issue where remote config values are not updated after enrolling to a variant | ||
## 24.4.2 | ||
* Improved crash filtering capabilities to include modifications on the crash report | ||
## 24.4.1 | ||
@@ -2,0 +72,0 @@ * Added support for Feedback Widget terms and conditions |
{ | ||
"name": "countly-sdk-react-native-bridge", | ||
"version": "24.4.1", | ||
"version": "25.1.0", | ||
"author": "Countly <hello@count.ly> (https://count.ly/)", | ||
@@ -5,0 +5,0 @@ "bugs": { |
52
Utils.js
@@ -55,26 +55,35 @@ import * as L from "./Logger.js"; | ||
json.loggingEnabled = config.loggingEnabled; | ||
L.i(`init configuration, Enabled logging in ${__DEV__ ? "development" : "production"} mode`) | ||
} | ||
if (config.crashReporting) { | ||
json.crashReporting = config.crashReporting; | ||
if (config._crashReporting) { | ||
json.crashReporting = true; | ||
L.i(`init configuration, Enabled crash reporting`) | ||
} | ||
if (config.shouldRequireConsent) { | ||
json.shouldRequireConsent = config.shouldRequireConsent; | ||
L.i(`init configuration, Require consent`) | ||
} | ||
if (config.consents) { | ||
json.consents = config.consents; | ||
L.i(`init configuration, Consents: ${JSON.stringify(config.consents)}`) | ||
} | ||
if (config.locationCountryCode) { | ||
json.locationCountryCode = config.locationCountryCode; | ||
L.i(`init configuration, Location country code: ${config.locationCountryCode}`) | ||
} | ||
if (config.locationCity) { | ||
json.locationCity = config.locationCity; | ||
L.i(`init configuration, Location city: ${config.locationCity}`) | ||
} | ||
if (config.locationGpsCoordinates) { | ||
json.locationGpsCoordinates = config.locationGpsCoordinates; | ||
L.i(`init configuration, Location gps coordinates: ${config.locationGpsCoordinates}`) | ||
} | ||
if (config.locationIpAddress) { | ||
json.locationIpAddress = config.locationIpAddress; | ||
L.i(`init configuration, Location ip address: ${config.locationIpAddress}`) | ||
} | ||
if (config.tamperingProtectionSalt) { | ||
json.tamperingProtectionSalt = config.tamperingProtectionSalt; | ||
L.i(`init configuration, Tampering protection salt: ${config.tamperingProtectionSalt}`) | ||
} | ||
@@ -84,32 +93,50 @@ // APM ------------------------------------------------ | ||
json.enableForegroundBackground = config.apm.enableForegroundBackground; | ||
L.i(`init configuration, APM enabled foreground background`) | ||
} | ||
if (config.apm.enableManualAppLoaded) { | ||
json.enableManualAppLoaded = config.apm.enableManualAppLoaded; | ||
L.i(`init configuration, APM enabled manual app loaded`) | ||
} | ||
if (config.apm.startTSOverride) { | ||
json.startTSOverride = config.apm.startTSOverride; | ||
L.i(`init configuration, APM start timestamp override: ${config.apm.startTSOverride}`) | ||
} | ||
if (config.apm.trackAppStartTime) { | ||
json.trackAppStartTime = config.apm.trackAppStartTime; | ||
L.i(`init configuration, APM track app start time`) | ||
} | ||
// Legacy APM | ||
if (config.enableApm) { | ||
json.enableApm = config.enableApm; | ||
if (config._apmLegacy) { | ||
json.enableApm = true; | ||
L.i(`init configuration, APM start time recording enabled`) | ||
} | ||
// APM END -------------------------------------------- | ||
if (config.disableAdditionalIntentRedirectionChecks) { | ||
json["disableAdditionalIntentRedirectionChecks"] = config.disableAdditionalIntentRedirectionChecks; | ||
if (config.experimental.enablePreviousNameRecording) { | ||
json.enablePreviousNameRecording = true; | ||
L.i(`init configuration, Enabled previous name recording`) | ||
} | ||
if (config.experimental.enableVisibilityTracking) { | ||
json.enableVisibilityTracking = true; | ||
L.i(`init configuration, Enabled visibility tracking`) | ||
} | ||
if (config._disableIntentRedirectionCheck) { | ||
json.disableAdditionalIntentRedirectionChecks = true; | ||
L.i(`init configuration, Disabled additional intent redirection checks`) | ||
} | ||
const pushNotification = {}; | ||
if (config.tokenType) { | ||
pushNotification.tokenType = config.tokenType; | ||
L.i(`init configuration, Token type: ${config.tokenType}`) | ||
} | ||
if (config.channelName) { | ||
pushNotification.channelName = config.channelName; | ||
L.i(`init configuration, Channel name: ${config.channelName}`) | ||
} | ||
if (config.channelDescription) { | ||
pushNotification.channelDescription = config.channelDescription; | ||
L.i(`init configuration, Channel description: ${config.channelDescription}`) | ||
} | ||
if (config.accentColor) { | ||
pushNotification.accentColor = config.accentColor; | ||
L.i(`init configuration, Accent color: ${config.accentColor}`) | ||
} | ||
@@ -119,14 +146,19 @@ json.pushNotification = pushNotification; | ||
json.allowedIntentClassNames = config.allowedIntentClassNames; | ||
L.i(`init configuration, Allowed intent class names: ${config.allowedIntentClassNames}`) | ||
} | ||
if (config.allowedIntentClassNames) { | ||
json.allowedIntentPackageNames = config.allowedIntentPackageNames; | ||
L.i(`init configuration, Allowed intent package names: ${config.allowedIntentPackageNames}`) | ||
} | ||
if (config.starRatingTextTitle) { | ||
json.starRatingTextTitle = config.starRatingTextTitle; | ||
L.i(`init configuration, Star rating text title: ${config.starRatingTextTitle}`) | ||
} | ||
if (config.starRatingTextMessage) { | ||
json.starRatingTextMessage = config.starRatingTextMessage; | ||
L.i(`init configuration, Star rating text message: ${config.starRatingTextMessage}`) | ||
} | ||
if (config.starRatingTextDismiss) { | ||
json.starRatingTextDismiss = config.starRatingTextDismiss; | ||
L.i(`init configuration, Star rating text dismiss: ${config.starRatingTextDismiss}`) | ||
} | ||
@@ -136,5 +168,7 @@ if (config.campaignType) { | ||
json.campaignData = config.campaignData; | ||
L.i(`init configuration, Campaign type: ${config.campaignType}, Campaign data: ${config.campaignData}`) | ||
} | ||
if (config.attributionValues) { | ||
json.attributionValues = config.attributionValues; | ||
L.i(`init configuration, Attribution values: ${config.attributionValues}`) | ||
} | ||
@@ -147,2 +181,3 @@ // Limits ----------------------------------------------- | ||
json.maxKeyLength = config.sdkInternalLimits.maxKeyLength; | ||
L.i(`init configuration, Max key length: ${config.sdkInternalLimits.maxKeyLength}`) | ||
} | ||
@@ -155,2 +190,3 @@ } | ||
json.maxValueSize = config.sdkInternalLimits.maxValueSize; | ||
L.i(`init configuration, Max value size: ${config.sdkInternalLimits.maxValueSize}`) | ||
} | ||
@@ -163,2 +199,3 @@ } | ||
json.maxSegmentationValues = config.sdkInternalLimits.maxSegmentationValues; | ||
L.i(`init configuration, Max segmentation values: ${config.sdkInternalLimits.maxSegmentationValues}`) | ||
} | ||
@@ -171,2 +208,3 @@ } | ||
json.maxBreadcrumbCount = config.sdkInternalLimits.maxBreadcrumbCount; | ||
L.i(`init configuration, Max breadcrumb count: ${config.sdkInternalLimits.maxBreadcrumbCount}`) | ||
} | ||
@@ -179,2 +217,3 @@ } | ||
json.maxStackTraceLinesPerThread = config.sdkInternalLimits.maxStackTraceLinesPerThread; | ||
L.i(`init configuration, Max stack trace lines per thread: ${config.sdkInternalLimits.maxStackTraceLinesPerThread}`) | ||
} | ||
@@ -187,2 +226,3 @@ } | ||
json.maxStackTraceLineLength = config.sdkInternalLimits.maxStackTraceLineLength; | ||
L.i(`init configuration, Max stack trace line length: ${config.sdkInternalLimits.maxStackTraceLineLength}`) | ||
} | ||
@@ -189,0 +229,0 @@ } |
@@ -137,14 +137,2 @@ import * as L from "./Logger.js"; | ||
// validate segmentation values | ||
if (segmentation) { | ||
for (const key in segmentation) { | ||
const value = segmentation[key]; | ||
const valueType = typeof value; | ||
if (value && valueType !== "string" && valueType !== "number" && valueType !== "boolean") { | ||
L.w(`${functionName}, segmentation value: [${value}] for the key: [${key}] must be a number, string or boolean!`); | ||
return false; | ||
} | ||
} | ||
} | ||
if (eventCount && (typeof eventCount !== "number" || eventCount < 0)) { | ||
@@ -151,0 +139,0 @@ L.w(`${functionName}, provided eventCount: [${eventCount}]. It must be a positive number!`); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1311406
196
8086