File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N
121
121
122
122
pushHandler.notificationMessage = userInfo;
123
123
pushHandler.isInline = NO ;
124
+ pushHandler.tapped = false ;
124
125
[pushHandler notificationReceived ];
125
126
} else {
126
127
NSLog (@" just put it in the shade" );
@@ -176,6 +177,7 @@ - (void)pushPluginOnApplicationDidBecomeActive:(NSNotification *)notification {
176
177
177
178
if (self.launchNotification ) {
178
179
pushHandler.isInline = NO ;
180
+ pushHandler.tapped = true ;
179
181
pushHandler.coldstart = [self .coldstart boolValue ];
180
182
pushHandler.notificationMessage = self.launchNotification ;
181
183
self.launchNotification = nil ;
@@ -195,6 +197,7 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
195
197
PushPlugin *pushHandler = [self getCommandInstance: @" PushNotification" ];
196
198
pushHandler.notificationMessage = notification.request .content .userInfo ;
197
199
pushHandler.isInline = YES ;
200
+ pushHandler.tapped = false ;
198
201
[pushHandler notificationReceived ];
199
202
200
203
completionHandler (UNNotificationPresentationOptionNone );
Original file line number Diff line number Diff line change 35
35
{
36
36
NSDictionary *notificationMessage;
37
37
BOOL isInline;
38
+ BOOL tapped;
38
39
NSString *notificationCallbackId;
39
40
NSString *callback;
40
41
BOOL clearBadge;
51
52
52
53
@property (nonatomic , strong ) NSDictionary *notificationMessage;
53
54
@property BOOL isInline;
55
+ @property BOOL tapped;
54
56
@property BOOL coldstart;
55
57
@property BOOL clearBadge;
56
58
@property (nonatomic , strong ) NSMutableDictionary *handlerObj;
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ @implementation PushPlugin : CDVPlugin
36
36
37
37
@synthesize notificationMessage;
38
38
@synthesize isInline;
39
+ @synthesize tapped;
39
40
@synthesize coldstart;
40
41
41
42
@synthesize callbackId;
@@ -454,6 +455,12 @@ - (void)notificationReceived {
454
455
[additionalData setObject: [NSNumber numberWithBool: NO ] forKey: @" coldstart" ];
455
456
}
456
457
458
+ if (tapped) {
459
+ [additionalData setObject: [NSNumber numberWithBool: YES ] forKey: @" tapped" ];
460
+ } else {
461
+ [additionalData setObject: [NSNumber numberWithBool: NO ] forKey: @" tapped" ];
462
+ }
463
+
457
464
[message setObject: additionalData forKey: @" additionalData" ];
458
465
459
466
// send notification message
@@ -463,6 +470,7 @@ - (void)notificationReceived {
463
470
464
471
self.coldstart = NO ;
465
472
self.notificationMessage = nil ;
473
+ self.tapped = false ;
466
474
}
467
475
}
468
476
You can’t perform that action at this time.
0 commit comments