```coffeescript
if Meteor.isCordova
	document.addEventListener 'pause', ->
		Meteor.disconnect()

	document.addEventListener 'resume', ->
		Meteor.reconnect()```

Set user as away when app goes to background and online when back to foreground
user
```coffeescript
if Meteor.isCordova
	document.addEventListener 'pause', ->
		UserPresence.setAway()

	document.addEventListener 'resume', ->
		UserPresence.setOnline()```
assistant