diff --git a/code/core/src/main/java/com/adobe/marketing/mobile/internal/CoreConstants.kt b/code/core/src/main/java/com/adobe/marketing/mobile/internal/CoreConstants.kt index 18ac47ce8..1082c2ad1 100644 --- a/code/core/src/main/java/com/adobe/marketing/mobile/internal/CoreConstants.kt +++ b/code/core/src/main/java/com/adobe/marketing/mobile/internal/CoreConstants.kt @@ -89,4 +89,23 @@ internal object CoreConstants { const val NONE = "N" } } + + object EventNames { + const val ANALYTICS_TRACK = "Analytics Track" + const val COLLECT_PII = "Collect PII" + const val COLLECT_DATA = "Collect Data" + const val CONFIGURE_WITH_APP_ID = "Configure with App ID" + const val CONFIGURE_WITH_FILE_PATH = "Configure with File Path" + const val CLEAR_UPDATED_CONFIGURATION = "Clear Updated Configuration" + const val CONFIGURATION_REQUEST = "Configuration Request" + const val CONFIGURATION_RESPONSE = "Configuration Response" + const val CONFIGURATION_UPDATE = "Configuration Update" + const val GET_SDK_IDENTITIES = "Get SDK Identities" + const val LIFECYCLE_PAUSE = "Lifecycle Pause" + const val LIFECYCLE_RESUME = "Lifecycle Resume" + const val PRIVACY_STATUS_REQUEST = "Privacy Status Request" + const val SET_PUSH_IDENTIFIER = "Set Push Identifier" + const val SET_ADVERTISING_IDENTIFIER = "Set Advertising Identifier" + const val RESET_IDENTITIES_REQUEST = "Reset Identities Request" + } } diff --git a/code/core/src/main/java/com/adobe/marketing/mobile/internal/configuration/ConfigurationExtension.kt b/code/core/src/main/java/com/adobe/marketing/mobile/internal/configuration/ConfigurationExtension.kt index dc7e34f58..2fd86a603 100644 --- a/code/core/src/main/java/com/adobe/marketing/mobile/internal/configuration/ConfigurationExtension.kt +++ b/code/core/src/main/java/com/adobe/marketing/mobile/internal/configuration/ConfigurationExtension.kt @@ -493,7 +493,7 @@ internal class ConfigurationExtension : Extension { triggerEvent: Event? = null ) { val builder = Event.Builder( - "Configuration Response Event", + CoreConstants.EventNames.CONFIGURATION_RESPONSE, EventType.CONFIGURATION, EventSource.RESPONSE_CONTENT ).setEventData(eventData) @@ -509,7 +509,7 @@ internal class ConfigurationExtension : Extension { private fun dispatchConfigurationRequest(eventData: Map) { val event = Event.Builder( - "Configure with AppID Internal", + CoreConstants.EventNames.CONFIGURATION_REQUEST, EventType.CONFIGURATION, EventSource.REQUEST_CONTENT ) diff --git a/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCore.java b/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCore.java index 33d06f471..10597a492 100644 --- a/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCore.java +++ b/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCore.java @@ -395,7 +395,7 @@ public static void setAdvertisingIdentifier(@Nullable final String advertisingId Event event = new Event.Builder( - "SetAdvertisingIdentifier", + CoreConstants.EventNames.SET_ADVERTISING_IDENTIFIER, EventType.GENERIC_IDENTITY, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -414,7 +414,7 @@ public static void setPushIdentifier(@Nullable final String pushIdentifier) { Event event = new Event.Builder( - "SetPushIdentifier", + CoreConstants.EventNames.SET_PUSH_IDENTIFIER, EventType.GENERIC_IDENTITY, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -440,7 +440,10 @@ public static void collectPii(@NonNull final Map data) { final Map eventData = new HashMap<>(); eventData.put(CoreConstants.EventDataKeys.Signal.SIGNAL_CONTEXT_DATA, data); Event event = - new Event.Builder("CollectPII", EventType.GENERIC_PII, EventSource.REQUEST_CONTENT) + new Event.Builder( + CoreConstants.EventNames.COLLECT_PII, + EventType.GENERIC_PII, + EventSource.REQUEST_CONTENT) .setEventData(eventData) .build(); dispatchEvent(event); @@ -474,7 +477,10 @@ public static void collectMessageInfo(@NonNull final Map message } Event event = - new Event.Builder("CollectData", EventType.GENERIC_DATA, EventSource.OS) + new Event.Builder( + CoreConstants.EventNames.COLLECT_DATA, + EventType.GENERIC_DATA, + EventSource.OS) .setEventData(messageInfo) .build(); dispatchEvent(event); @@ -512,7 +518,10 @@ static void collectLaunchInfo(final Activity activity) { } Event event = - new Event.Builder("CollectData", EventType.GENERIC_DATA, EventSource.OS) + new Event.Builder( + CoreConstants.EventNames.COLLECT_DATA, + EventType.GENERIC_DATA, + EventSource.OS) .setEventData(marshalledData) .build(); dispatchEvent(event); @@ -546,7 +555,7 @@ public static void configureWithAppID(@NonNull final String appId) { Event event = new Event.Builder( - "Configure with AppID", + CoreConstants.EventNames.CONFIGURE_WITH_APP_ID, EventType.CONFIGURATION, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -590,7 +599,7 @@ public static void configureWithFileInAssets(@NonNull final String fileName) { Event event = new Event.Builder( - "Configure with FilePath", + CoreConstants.EventNames.CONFIGURE_WITH_FILE_PATH, EventType.CONFIGURATION, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -633,7 +642,7 @@ public static void configureWithFileInPath(@NonNull final String filePath) { Event event = new Event.Builder( - "Configure with FilePath", + CoreConstants.EventNames.CONFIGURE_WITH_FILE_PATH, EventType.CONFIGURATION, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -671,7 +680,7 @@ public static void updateConfiguration(@NonNull final Map config Event event = new Event.Builder( - "Configuration Update", + CoreConstants.EventNames.CONFIGURATION_UPDATE, EventType.CONFIGURATION, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -694,7 +703,7 @@ public static void clearUpdatedConfiguration() { Event event = new Event.Builder( - "Configuration Update", + CoreConstants.EventNames.CLEAR_UPDATED_CONFIGURATION, EventType.CONFIGURATION, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -755,7 +764,7 @@ public static void getPrivacyStatus(final AdobeCallback cal true); Event event = new Event.Builder( - "PrivacyStatusRequest", + CoreConstants.EventNames.PRIVACY_STATUS_REQUEST, EventType.CONFIGURATION, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -831,7 +840,7 @@ public void call(final Event event) { Event event = new Event.Builder( - "getSdkIdentities", + CoreConstants.EventNames.GET_SDK_IDENTITIES, EventType.CONFIGURATION, EventSource.REQUEST_IDENTITY) .build(); @@ -844,7 +853,7 @@ public void call(final Event event) { public static void resetIdentities() { Event event = new Event.Builder( - "Reset Identities Request", + CoreConstants.EventNames.RESET_IDENTITIES_REQUEST, EventType.GENERIC_IDENTITY, EventSource.REQUEST_RESET) .build(); @@ -882,7 +891,7 @@ public static void lifecycleStart(@Nullable final Map additional Event event = new Event.Builder( - "LifecycleResume", + CoreConstants.EventNames.LIFECYCLE_RESUME, EventType.GENERIC_LIFECYCLE, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -913,7 +922,7 @@ public static void lifecyclePause() { Event event = new Event.Builder( - "LifecyclePause", + CoreConstants.EventNames.LIFECYCLE_PAUSE, EventType.GENERIC_LIFECYCLE, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -947,7 +956,7 @@ public static void trackAction( contextData == null ? new HashMap() : contextData); Event event = new Event.Builder( - "Analytics Track", + CoreConstants.EventNames.ANALYTICS_TRACK, EventType.GENERIC_TRACK, EventSource.REQUEST_CONTENT) .setEventData(eventData) @@ -978,7 +987,7 @@ public static void trackState( contextData == null ? new HashMap() : contextData); Event event = new Event.Builder( - "Analytics Track", + CoreConstants.EventNames.ANALYTICS_TRACK, EventType.GENERIC_TRACK, EventSource.REQUEST_CONTENT) .setEventData(eventData)