File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 34
34
console . log ( "onPushReceived: " + JSON . stringify ( event ) )
35
35
} )
36
36
37
+ Airship . push . onBackgroundPushReceived ( function ( event ) {
38
+ console . log ( "onBackgroundPushReceived: " + JSON . stringify ( event ) )
39
+ } )
40
+
37
41
Airship . push . onNotificationResponse ( function ( event ) {
38
42
console . log ( "onNotificationResponse: " + JSON . stringify ( event ) )
39
43
} )
Original file line number Diff line number Diff line change @@ -1082,6 +1082,16 @@ export interface AirshipPush {
1082
1082
callback : ( event : PushReceivedEvent ) => void
1083
1083
) : Cancellable
1084
1084
1085
+ /**
1086
+ * Background push received listener.
1087
+ *
1088
+ * @param callback The callback.
1089
+ * @return A cancellable that can be used to cancel the listener.
1090
+ */
1091
+ onBackgroundPushReceived (
1092
+ callback : ( event : PushReceivedEvent ) => void
1093
+ ) : Cancellable
1094
+
1085
1095
/**
1086
1096
* Notification response listener.
1087
1097
*
Original file line number Diff line number Diff line change @@ -377,6 +377,11 @@ airship.push.onPushReceived = function (callback) {
377
377
return registerListener ( "airship.event.push_received" , callback )
378
378
}
379
379
380
+ airship . push . onBackgroundPushReceived = function ( callback ) {
381
+ argscheck . checkArgs ( 'F' , 'Airship.push.onBackgroundPushReceived' , arguments )
382
+ return registerListener ( "airship.event.background_push_received" , callback )
383
+ }
384
+
380
385
airship . push . onNotificationResponse = function ( callback ) {
381
386
argscheck . checkArgs ( 'F' , 'Airship.push.onNotificationResponse' , arguments )
382
387
return registerListener ( "airship.event.notification_response" , callback )
You can’t perform that action at this time.
0 commit comments