You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it safe to store application state to Prefrences by using @capacitor/app as follows App.addListener("pause", ()=>{...}) or should I use @capacitor/background-runner for that purpose to make sure that job of saving application state to Prefrences (any asynchronous operation) is completed even when the application is in background?
How much time do we have available within the "pause" event handler from App.addListener("pause", ()=>{...}) ?
I am aware of the fact that Preferences plugin does not take long to execute but the question is also related to any asynchronous operation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is it safe to store application state to Prefrences by using @capacitor/app as follows
App.addListener("pause", ()=>{...})
or should I use@capacitor/background-runner
for that purpose to make sure that job of saving application state to Prefrences (any asynchronous operation) is completed even when the application is in background?How much time do we have available within the "pause" event handler from
App.addListener("pause", ()=>{...})
?I am aware of the fact that Preferences plugin does not take long to execute but the question is also related to any asynchronous operation.
Beta Was this translation helpful? Give feedback.
All reactions