How to show a different screen if mobile meteor app is offline?


#1

I’m trying to show a simple “Server Error” template when a meteor mobile phone app isn’t connected to the internet. This app should really only work online, but I’m just trying to show a page for when the phone isn’t connected to the internet.

My current approach of using this code in a template helper:

return Meteor.status().status === "offline";

isn’t evaluating to true for the helpers I’m using.

Does anyone have a soltuion for this?

Cheers!


#2

“offline” is the result when a user has disconnected. You may be better trying:

return Meteor.status().status !== "connected";