Please help, How can I restart the app, if user is not using and it's running as a background for more than a 24hours

Currently I am using React version.

I have to show a message or restart the App, if someone is not using that app more than a day. could you please help or any suggestion would be really good.

I guess it is a cordova app, then you need a combination of:

document.addEventListener('pause', () => {
  // do something on app closed/minimized
document.addEventListener('resume', () => {
  // app returned from background
window.location.reload() // -> to reload the web app

Thank you so much, I added the code I confirm back to you.

Once again thank you so much.