Background task for notification

Hi I am trying to develop an app that has a notification feature, but my problem is I don’t know how to show notification even if the app is close. I tried using the native background mode but it only works if the app is in tab.