Android hms notification second click don't work as needed

500 views Asked by At

I have notifications from huawei push kit with click_action : {type : 3 }. When app is in background. I recieve 2 or more notification. After click on first notification (don't matter first position or last in notifications on the screen) all works fine. App open launcher activity and I recieved data from the intent in onCreate. But then app is not in background allready and I click next notification and nothing happen. (Normaly it would trigger onNewIntent in the launcher activity and I can recieve data from intent). Why it may happen?

What I'am doing. Frist I close app. Than send two push notification. Than click on one notification (app opens and go to needed fragment, all fine). Than click on another notification, while app is open after fist notification click. And nothing happen(onNewIntent don't triggered). From docs: when app is closed, notifications processed by NC, and whith clic_type: 3 (open app) with opened app onNewIntent must be calld, if I'm not mistaken.

HuaweiLogs - HuaweiLogs

Video Example - (Procedure: 1)close app 2) Send two identical push, that lead on the same page 3) Click to first push (1:05 time), all works fine 5) go to another page 5) click second push and nothing happen) HmsTest

Notifications are sends from backend like this: Notification

UpdateActivityManifest

click logs - click logs

log.txt logs from project menu

1

There are 1 answers

17
zhangxaochen On

Can you provide the log information printed in the onNewIntent method?

After testing, I find that the oncreat method is triggered when I click it for the first time, and the onNewIntent method is triggered when I click it for the second time. The following figure shows the test result:

enter image description here