{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/9527","repository_url":"https://api.github.com/repos/driftyco/ionic","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/9527/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/9527/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/9527/events","html_url":"https://github.com/driftyco/ionic/issues/9527","id":193978085,"number":9527,"title":"On resume not fired","user":{"login":"sadiq-mc","id":14868332,"avatar_url":"https://avatars.githubusercontent.com/u/14868332?v=3","gravatar_id":"","url":"https://api.github.com/users/sadiq-mc","html_url":"https://github.com/sadiq-mc","followers_url":"https://api.github.com/users/sadiq-mc/followers","following_url":"https://api.github.com/users/sadiq-mc/following{/other_user}","gists_url":"https://api.github.com/users/sadiq-mc/gists{/gist_id}","starred_url":"https://api.github.com/users/sadiq-mc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sadiq-mc/subscriptions","organizations_url":"https://api.github.com/users/sadiq-mc/orgs","repos_url":"https://api.github.com/users/sadiq-mc/repos","events_url":"https://api.github.com/users/sadiq-mc/events{/privacy}","received_events_url":"https://api.github.com/users/sadiq-mc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-07T07:37:04Z","updated_at":"2016-12-07T10:05:49Z","closed_at":null,"body":"**Ionic version:**\r\nionic --version    : 2.1.8\r\ncordova --version   : 6.4.0\r\ncordova platform version android :6.0.0\r\n\r\nI am stuck with on resume event. I can't get it fired when launching the app from coldstart. And at times it gets fired after few seconds when app is started and opened home page.\r\n\r\n```\r\nvar app = angular.module('myIonicApp', ['ionic',\r\n    'ngCordova',\r\n    'angular-md5',\r\n    'ngStorage',\r\n    'angularSpinner',\r\n    'ngMessages',\r\n    'ngMap',\r\n    'ngAnimate'\r\n]);\r\n\r\napp.run(function($ionicPlatform, $rootScope, $location, $localStorage,\r\n    appConstants) {\r\n\t\r\n\t$ionicPlatform.ready(function() {\r\n\t\tconsole.log('$ionicPlatform.ready'); // This works\r\n\r\n                document.addEventListener(\"resume\", function() {\r\n                       console.log(\"resume\"); // Fired sometimes and that too after few seconds of ready console.\r\n                  }, false);\r\n\r\n                document.addEventListener(\"pause\", function() {\r\n                         console.log(\"pause\"); // This works. Prints all time when I close that app or switch to different app.\r\n                 }, false);\r\n\t });\r\n});\r\n```\r\n\r\nAm I missing anything..?"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic/issues/comments/265406615","html_url":"https://github.com/driftyco/ionic/issues/9527#issuecomment-265406615","issue_url":"https://api.github.com/repos/driftyco/ionic/issues/9527","id":265406615,"user":{"login":"graphefruit","id":6260244,"avatar_url":"https://avatars.githubusercontent.com/u/6260244?v=3","gravatar_id":"","url":"https://api.github.com/users/graphefruit","html_url":"https://github.com/graphefruit","followers_url":"https://api.github.com/users/graphefruit/followers","following_url":"https://api.github.com/users/graphefruit/following{/other_user}","gists_url":"https://api.github.com/users/graphefruit/gists{/gist_id}","starred_url":"https://api.github.com/users/graphefruit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graphefruit/subscriptions","organizations_url":"https://api.github.com/users/graphefruit/orgs","repos_url":"https://api.github.com/users/graphefruit/repos","events_url":"https://api.github.com/users/graphefruit/events{/privacy}","received_events_url":"https://api.github.com/users/graphefruit/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T10:05:49Z","updated_at":"2016-12-07T10:05:49Z","body":"@sadiq-mc Have you checked if the device-ready is realy fired?\r\nIf the `device-ready` is not fired the `$ionicPlatform.ready` won't be executed at all.\r\nMaybe try to wrap your listener on `$(document).ready` or `$(window).load`\r\nAre you using crosswalk?\r\nGreetings\r\nGrapheruit"}}
{"actor":{"display_login":"graphefruit"}}