-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65d8f79
commit c93eddc
Showing
18 changed files
with
241 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 26 additions & 7 deletions
33
OmetriaSDK/src/main/java/com/android/ometriasdk/notification/OmetriaNotification.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,31 @@ | ||
package com.android.ometriasdk.notification | ||
|
||
/** | ||
* Created by cristiandregan | ||
* on 27/08/2020. | ||
* An object that exposes the content of a received notification. | ||
* | ||
* @param deepLinkActionUrl The URL that was sent in the notification. We append tracking parameters to the URL | ||
* specified in the account and campaign settings (these can be changed in the Ometria app). | ||
* @param imageUrl The image URL that was sent in the notification. | ||
* @param campaignType Can be trigger, mass, transactional (currently only trigger is used). | ||
* @param externalCustomerId The id of the contact that was specified at customer creation (in the mobile app) or ingesting to Ometria. | ||
* @param sendId Unique id of the message. | ||
* @param tracking A map that contains all tracking fields specified in the account and campaign | ||
* settings (can be changed in the Ometria app, uses some defaults if not specified). | ||
*/ | ||
|
||
internal data class OmetriaNotification( | ||
val imageUrl: String?, | ||
data class OmetriaNotification( | ||
val deepLinkActionUrl: String?, | ||
val context: Map<String, Any>?, | ||
) | ||
val imageUrl: String?, | ||
val campaignType: String?, | ||
val externalCustomerId: String?, | ||
val sendId: String?, | ||
val tracking: Map<String, Any>? | ||
) { | ||
override fun toString(): String { | ||
return "deepLinkActionUrl: $deepLinkActionUrl\n\n" + | ||
"imageUrl: $imageUrl\n\n" + | ||
"campaignType: $campaignType\n\n" + | ||
"externalCustomerId: $externalCustomerId\n\n" + | ||
"sendId: $sendId\n\n" + | ||
"tracking: $tracking" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
OmetriaSDK/src/main/java/com/android/ometriasdk/notification/OmetriaNotificationBody.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.android.ometriasdk.notification | ||
|
||
/** | ||
* Created by cristiandregan | ||
* on 27/08/2020. | ||
*/ | ||
|
||
internal data class OmetriaNotificationBody( | ||
val imageUrl: String?, | ||
val deepLinkActionUrl: String?, | ||
val context: Map<String, Any>? | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.