katzer / cordova-plugin-local-notifications

Cordova Local-Notification Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When I click notification app crashes

ghostcommander0102 opened this issue · comments

WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Provide a general summary of the issue.
When I receive message I push notification of messages but when I click notification app crashes.

Your Environment

  • Plugin version: 1.0.0
  • Platform: ASUS_Z01QD Android 9, API 28
  • OS version:
  • Device manufacturer / model:
  • Cordova version (cordova -v): 8.1.2
  • Cordova platform version (cordova platform ls): android 7.1.4
  • Plugin config
  • Ionic Version (if using Ionic) 3.2.0

Expected Behavior

Tell us what should happen
When I click it goes to chat screen

Actual Behavior

Tell us what happens instead
App crash

Steps to Reproduce

Reproduce this issue; include code to reproduce, if relevant

  1. ...
  2. ...
  3. ...
  4. ....

Context

What were you trying to do?

Debug logs

Include iOS / Android logs

  • ios XCode logs
  • Android: $ adb logcat
    We are entering execute
    2023-09-25 13:29:47.623 430-7988 ActivityManager system_server I START u0 {flg=0x5000c000 cmp=com.glosita.app/de.appplant.cordova.plugin.localnotification.ClickReceiver (has extras)} from uid 10084
    2023-09-25 13:29:47.627 6785-6785 CordovaActivity com.glosita.app D CordovaActivity.onDestroy()
    2023-09-25 13:29:47.628 6785-6785 Process com.glosita.app I Sending signal. PID: 6785 SIG: 9
    2023-09-25 13:29:47.683 430-509 InputDispatcher system_server W channel 'a4b6fc com.glosita.app/com.glosita.app.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
    2023-09-25 13:29:47.683 430-509 InputDispatcher system_server E channel 'a4b6fc com.glosita.app/com.glosita.app.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
    ---------------------------- PROCESS ENDED (6785) for package com.glosita.app ----------------------------
    2023-09-25 13:29:47.697 430-8751 ActivityManager system_server I Process com.glosita.app (pid 6785) has died: fore TOP
    2023-09-25 13:29:47.698 430-5110 WindowManager system_server I WIN DEATH: Window{a4b6fc u0 com.glosita.app/com.glosita.app.MainActivity}
    2023-09-25 13:29:47.698 430-5110 InputDispatcher system_server W Attempted to unregister already unregistered input channel 'a4b6fc com.glosita.app/com.glosita.app.MainActivity (server)'
    2023-09-25 13:29:47.717 430-446 ActivityManager system_server I Start proc 7082:com.glosita.app/u0a84 for activity com.glosita.app/de.appplant.cordova.plugin.localnotification.ClickReceiver
    2023-09-25 13:29:47.903 561-561 NotificationEntryMgr com.android.systemui W removeNotification for unknown key: 0|com.glosita.app|1|null|10084
    2023-09-25 13:29:47.909 161-378 SurfaceFlinger surfaceflinger W Attempting to set client state on removed layer: Surface(name=AppWindowToken{feda5fa token=Token{a40a025 ActivityRecord{bb5cc1c u0 com.glosita.app/de.appplant.cordova.plugin.localnotification.ClickReceiver t41}}})/@0x514319b - animation-leash#0
    2023-09-25 13:29:47.909 161-378 SurfaceFlinger surfaceflinger W Attempting to destroy on removed layer: Surface(name=AppWindowToken{feda5fa token=Token{a40a025 ActivityRecord{bb5cc1c u0 com.glosita.app/de.appplant.cordova.plugin.localnotification.ClickReceiver t41}}})/@0x514319b - animation-leash#0

https://github.com/ZarishIqbal/cordova-local-notifications-plugin use this

Thanks for this fork but there's one issue I discovered after using it, clicking a notification no longer crashes app. However, the "this" object passed to click event on notification no longer carries other keys such as title and message. It only carries the event key which has a value of click. Can this be fixed? After updating to use this plugin, I get null when I click on notification. On previous build, I usually display the title and message in an alert dialogue.

Thanks