Reload a page on app resume

nativescriptcore
ios
android

#1

I would like to be able to reload/refresh the current page of the app when the application resumes from the background. After doing some googling the closest thing I found to a solution was in this stack overflow question I’m not a huge fan of the proposed solution here though as it requires the copying/pasting of a private method, as well as this approach would muck-up my app.ts file more than it already is.

Is there a reasonable way to approach this with out the need to add navigation calls and a bunch of additional logic?


#2

This is an extremely hacky solution, but you could store the current location (view) of your app in application settings and then in the resume application event redirect to the last saved location. Not 100% sure that would work…but might be worth a try :slight_smile:


#3

That was my original approach and it definitely felt hacky. I’m continuing to use it for now was just hoping there was a better way out there that I wasn’t thinking about.