Alerts / Push? from background mode timer (local app)

I have not really done much with background mode before and I have not used push notifications before.

What am trying to achieve is to give the user a warning they are going to be auto logged out 5 minutes before it happens and give them a chance to refresh their token.

It works fine when the app is active in the foreground. I pop up an alert and get them to click “ok” otherwise after 5 mins it logs out.

I have added @ionic-native/background-mode to my project and enabled background mode but I am not sure how to get the app to alert the user.

Is there a way to do this?
Could I use a push notification locally from the app to notify the user rather than an alert?

And the answer is: