Local Notification not working while calling on android

Hello guys!

I’m making app which shows local notification to the user when the user answers to incoming call. I implemented local notification and it works fine. but while incoming call and outgoing call local notification doesnt work. can anybody tell what am I doing wrong?

my code is here…



by the way I implemented CallTrap.