-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
NullPointerException in showIncomingCallNotification when app is closed
Description
When the app is closed and an incoming call is received, the plugin fails to show the native Android notification due to a NullPointerException. The call is received (sound plays), but no notification UI appears.
Error
E CapacitorTwilioVoice: Error showing notification: Attempt to invoke virtual method 'java.lang.String java.lang.Class.getName()' on a null object reference
E CapacitorTwilioVoice: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Class.getName()' on a null object reference
E CapacitorTwilioVoice: at android.content.ComponentName.<init>(ComponentName.java:133)
E CapacitorTwilioVoice: at android.content.Intent.<init>(Intent.java:8043)
E CapacitorTwilioVoice: at ee.forgr.capacitor_twilio_voice.CapacitorTwilioVoicePlugin.showIncomingCallNotification(CapacitorTwilioVoicePlugin.java:1659)
Steps to Reproduce
- Close the app completely
- Receive an incoming call
- Sound plays but no notification appears
- Check logs for NullPointerException
Expected Behavior
Native notification with Answer/Decline buttons should appear when app is closed.
Actual Behavior
Sound plays but notification fails to show due to NullPointerException.
Environment
- Plugin Version:
7.7.5 - Capacitor Version:
7.4.4 - Android Version: 13
- Package:
com.twiliocall.app - MainActivity:
com.twiliocall.app.MainActivity
Logs
11-23 22:28:09.447 D CapacitorTwilioVoice: Received incoming call from: client:gold
11-23 22:28:09.458 E CapacitorTwilioVoice: Error showing notification: Attempt to invoke virtual method 'java.lang.String java.lang.Class.getName()' on a null object reference
11-23 22:28:09.550 D CapacitorTwilioVoice: Started ringtone and vibration
Additional Context
- JavaScript events fire correctly
- Issue is in native notification creation at line 1659
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels