问题
I was trying to use these events for my autologout timer functionality however I now realise that these events are not available yet in Capacitor. https://forum.getcapacitor.com/t/platform-pause-platform-resume-not-working/249
Does anyone know a workaround of accessing these events or similar without using native plugins?
I can't use plugins as the webview of the device is fixed to an old version (44).
Edit: It turns out I can use some native plugins just not the Capacitor ones.
回答1:
These Cordova events have now been added to Capacitor Beta 22 for backward compatibility and resolve the issue.
来源:https://stackoverflow.com/questions/55681831/platform-pause-resume-events-not-firing-in-capacitor