 					else
 						location.hash = data.additionalData.data.url
 				
-				push.on 'error', alert
-				
-	# event for activity change
-	.run ($document, $rootScope, $log) ->
-		_.each ['pause', 'resume'], (event) -> 
-			document.addEventListener event, ->
-				$log.debug event
-				$rootScope.$broadcast event+				push.on 'error', alert
					reject()
				socket.on 'connect_timeout', ->
					reject()
					
			(method, url, post, callback, headers, timeout, withCredentials, responseType) ->
				p
					.then ->
						io.socket = socket
						opts = 

		$ionicConfigProvider.tabs.style 'standard'
		$ionicConfigProvider.tabs.position 'bottom'

	# define sails socket backend setting and initialize the backend
	.config ($provide) ->
		$provide.decorator '$sailsSocketBackend', ($delegate, $injector, $log) ->
			# socket connect
