DescriptionTrack active notifications in Java
Store their notification ID and target URL, along with the
ContentSuggestion::ID of the article.
When dismissing notifications (singly or multiply, manually or
automatically), check if the notification is displayed (for the
automatic case) and generate an action for each notification displayed
(for the multiple case). In this way, we can ensure that one action is
generated for each impression.
Also, check for a existing notification before displaying one and
generating an impression--sometimes we get duplicates, for example at
startup.
On Android M+, we could use the getActiveNotifications() API, and access
this information through the PendingIntent of the StatusBarNotification.
However, to support L, we need to do this ourself.
BUG=675561
Review-Url: https://codereview.chromium.org/2639553002
Cr-Commit-Position: refs/heads/master@{#445097}
Committed: https://chromium.googlesource.com/chromium/src/+/024a0052dc1108dcba765040cc75a7180943994e
Patch Set 1 #
Total comments: 9
Patch Set 2 : Address comments #
Total comments: 7
Patch Set 3 : Address comments #2 #Patch Set 4 : Review #3 #Patch Set 5 : FindBugs #Patch Set 6 : FindBugs 2 #
Messages
Total messages: 23 (11 generated)
|