Help with cordova, android platform

Hi there,

I am creating a mobile app using cordova, android platform.
I installed so that when my mobile app detect a beacon, i will receive notification.
Sadly, the notification only works when i run the app and then lock my phone.
When i tried to swipe away the app from the recent list, i wont receive any notification.

I know this problem can be solved because apps like FB, Whatsapp allows user to receive notification even when the app is not part of the recent list.

Can someone who has the same problem as me and has solved it help me out?
Thank you sooooooooo much.