Local notification not working as expected when app is closed

Hi Everyone.
The Ionic app tends to show the local notification with title and message when the app is closed.

But when the app is opened the same notification strategy looks like

I need help to show the notification as the second image in the system notification tray even though the app is closed.