@@ -85,7 +85,11 @@ private void Start() {
85
85
OneSignal . Default . NotificationWillShow += _notificationReceived ;
86
86
87
87
// Setup the below to listen for and respond to events from in app messages
88
- OneSignal . Default . InAppMessageTriggeredAction += IamTriggeredAction ;
88
+ OneSignal . Default . InAppMessageWillDisplay += _iamWillDisplay ;
89
+ OneSignal . Default . InAppMessageDidDisplay += _iamDidDisplay ;
90
+ OneSignal . Default . InAppMessageWillDismiss += _iamWillDismiss ;
91
+ OneSignal . Default . InAppMessageDidDismiss += _iamDidDismiss ;
92
+ OneSignal . Default . InAppMessageTriggeredAction += _iamTriggeredAction ;
89
93
90
94
// Setup the below to listen for and respond to state changes
91
95
OneSignal . Default . PermissionStateChanged += _permissionStateChanged ;
@@ -108,7 +112,23 @@ private Notification _notificationReceived(Notification notification) {
108
112
return notification ; // show the notification
109
113
}
110
114
111
- private void IamTriggeredAction ( InAppMessageAction inAppMessageAction ) {
115
+ private void _iamWillDisplay ( InAppMessage inAppMessage ) {
116
+ _log ( $ "IAM will display: { JsonUtility . ToJson ( inAppMessage ) } ") ;
117
+ }
118
+
119
+ private void _iamDidDisplay ( InAppMessage inAppMessage ) {
120
+ _log ( $ "IAM did display: { JsonUtility . ToJson ( inAppMessage ) } ") ;
121
+ }
122
+
123
+ private void _iamWillDismiss ( InAppMessage inAppMessage ) {
124
+ _log ( $ "IAM will dismiss: { JsonUtility . ToJson ( inAppMessage ) } ") ;
125
+ }
126
+
127
+ private void _iamDidDismiss ( InAppMessage inAppMessage ) {
128
+ _log ( $ "IAM did dismiss: { JsonUtility . ToJson ( inAppMessage ) } ") ;
129
+ }
130
+
131
+ private void _iamTriggeredAction ( InAppMessageAction inAppMessageAction ) {
112
132
_log ( $ "IAM triggered action: { JsonUtility . ToJson ( inAppMessageAction ) } ") ;
113
133
}
114
134
0 commit comments