問題描述
Đóng ứng dụng di động Trigger.io forge qua javascript (Android / iOS) ‑ để áp dụng Tải lại (Closing a Trigger.io forge mobile app via javascript (Android / iOS) ‑ in order to apply Reload)
Is it possible to ask a Trigger.io Forge mobile app to close itself through the forge JS api?
We're seeing users having problems with reloads: We pop up a message when a reload is available, but it's difficult for us to explain that they have to
- come out of the app
- wait an unknown amount of time (for the reload update to download)
- launch the app again
People either don't understand, or the force‑quit the app meaning the reload doesn't download, or they come out and go straight back in before it's downloaded ‑ and then see our 'reload' popup message immediately again.
I wondered if we could close the app for them if this would smooth things out a bit. Unless people have better suggestions for this user flow?
參考解法
方法 1:
Are you listening for the updateReady events to pop up your message? If so, the Reload update has actually already been downloaded and is ready to go: all the user needs to do at that point is switch away from the app and back again; no delay required.
The only way to programmatically close a Trigger.io is in the backPressed event listener, which won't be of use to you in this situation.
(by Meirion、James Brady)