You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I trying to capture push notification content, but the onNotificationOpenedApp is triggering when i tap on a push and my app oppen but the result data comes in empty object. the plugin works correctly for receive push notification, but not works for get the push info data or text to my app.
Expected behavior
result data comes with push info to be capture inside my app, when onNotificationOpenedApp event is fire, as show in documentation
{
//"validate_only": false,
"message":
{
"data": "{'param1':'value1','param2':'value2'}",
"notification":
{
"title": "Huawei Push Kit",
"body": "Hello, I'm a Push Kit."
},
"android":
{
"collapse_key": -1,
"notification":
{
"icon": "notification_icon",
"notify_id": 41186,
"foreground_show": false, --> try with this on and off same result
"badge": {
"add_num": 1,
"class": "com.ccc.app.MainActivity"
},
"click_action":
{
"type": 3 ,//open app in tap,
"action":"com.ccc.app.MainActivity"
}
},
"priority":"high",
"delayWhileIdle":false
},
"token": ["KAAAAACy0xX3AAC4yG4Oun3XYVPW7Id8SC6Rd0MIcF6rKXWocHHzQg6LzJXXxySWu6Tifgr1Sxo2CMT49zK9RyeME4IOvE3E2uhztPaHUFhSTyJhrw"]
}
}
The text was updated successfully, but these errors were encountered:
victor-sanchez-ccc
changed the title
onNotificationOpenedApp call whitout result data
onNotificationOpenedApp call without result data
Aug 10, 2023
victor-sanchez-ccc
changed the title
onNotificationOpenedApp call without result data
cordova-plugin-hms-push onNotificationOpenedApp call without result data
Aug 10, 2023
Description
I trying to capture push notification content, but the onNotificationOpenedApp is triggering when i tap on a push and my app oppen but the result data comes in empty object. the plugin works correctly for receive push notification, but not works for get the push info data or text to my app.
Expected behavior
result data comes with push info to be capture inside my app, when onNotificationOpenedApp event is fire, as show in documentation
onNotificationOpenedApp(callback)
Current behavior
result comes in empty object when app opened by touching a push notification
Logs
Logs from log inspector android studio running my app
I/HMSSDK_PendingResultImpl: init uri:push.gettoken
I/HmsPushInstanceId: HMSPush plugin initialized
I/HMSSDK_PendingResultImpl: setResultCallback
I/HMSSDK_HmsMessaging: invoke turnOnPush
I/HMSSDK_HMSPackageManager: Enter getHMSPackageNameForMultiService
I/chromium: [INFO:CONSOLE(15)] "NOTIFICATION_OPENED_EVENT {}", source: https://localhost/dist/bundle.js (15) <-- console log from app js
I/HMSSDK_HmsMessaging: turn on/off with AIDL
I/HMSSDK_HMSPackageManager: Enter getHMSPackageNameForMultiService
I/HMSSDK_HMSPackageManager: Enter getHMSPackageNameForMultiService
I/HMSSDK_HuaweiApi: No setInnerHms, hms pkg name is com.huawei.hwid
I/HMSSDK_HuaweiApi: sendRequest
D/HMSLogger: singleEventMap -> {apiName=getInitialNotification, package=com.ccc.app, cpAppVersion=2.6.6.1, version=6.3.0.304, platform=Cordova, result=0, costTime=0, service=Cross-Platform, kit=Push, appid=101754691, model=flame, networkType=WIFI, callTime=1691190441506}
I/HMSSDK_HMSPackageManager: Enter getHMSPackageName
I/HMSSDK_HuaweiApi: isConnected:true.
I/HMSSDK_BaseHmsClient: getAdapter:isInner:false, mInnerBinderAdapter:null, mOuterBinderAdapter:com.huawei.hms.adapter.OuterBinderAdapter@40ebfca
I/HMSSDK_HMSPackageManager: Enter getHMSPackageNameForMultiService
I/HMSSDK_HMSPackageManager: Enter getHMSPackageNameForMultiService
I/HMSSDK_RequestManager: addToConnectedReqMap
I/HMSSDK_HmsClient: post msg api_name:push.setNotifyFlag, app_id:101754691|, pkg_name:com.ccc.app, sdk_version:60800300, session_id:, transaction_id:101754691fyFlag20230804170721476343145, kitSdkVersion:60900300, apiLevel:1
I/HMSSDK_BaseAdapter: In constructor, activityWeakReference is java.lang.ref.WeakReference@83141fb, activity is com.ccc.app.MainActivity@3599851
I/HMSSDK_BaseAdapter: in baseRequest + uri is :push.setNotifyFlag, transactionId is : 101754691fyFlag20230804170721476343145
W/Parcel: Expecting binder but got null!
I/HMSSDK_PendingResultImpl: init uri:push.setNotifyFlag
I/HMSSDK_PendingResultImpl: setResultCallback
I/HMSSDK_PendingResultImpl: setResult:0
I/HMSSDK_HMSPackageManager: Enter getHMSPackageNameForMultiService
I/HMSSDK_BaseAdapter: api is: push.setNotifyFlag, resolution: null, status_code: 0
I/HMSSDK_HuaweiApi: No setInnerHms, hms pkg name is com.huawei.hwid
I/HMSSDK_BaseAdapter: baseCallBack.onComplete
I/HMSSDK_HMSPackageManager: Enter getHMSPackageNameForMultiService
I/HMSSDK_HuaweiApi: sendRequest
I/HMSSDK_HmsClient: receive msg status_code:0, error_code:0, api_name:push.setNotifyFlag, app_id:101754691|, pkg_name:com.ccc.app, session_id:, transaction_id:101754691fyFlag20230804170721476343145, resolution:null
I/HMSSDK_HMSPackageManager: Enter getHMSPackageName
I/HMSSDK_TaskApiCall: doExecute, uri:push.setNotifyFlag, errorCode:0, transactionId:101754691fyFlag20230804170721476343145
I/HMSSDK_HuaweiApi: isConnected:true.
I/HMSSDK_BaseVoidTask: Operate succeed
Environment
Other
Code inside my app in JavaScript
Push payload send in postman
The text was updated successfully, but these errors were encountered: